Skip to content

Commit 2f57b8b

Browse files
committed
core code is now in gdt-dev/core repository
Code code has been lifted and shifted to the gdt-dev/core repository, so this patch deletes all the duplicate code. Issue #55 Signed-off-by: Jay Pipes <jaypipes@gmail.com>
1 parent 36cdbbf commit 2f57b8b

File tree

118 files changed

+26
-7508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+26
-7508
lines changed

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tests:
8686
When using Ginkgo, developers create tests for a particular module (say, the
8787
`books` module) by creating a `books_test.go` file and calling some Ginkgo
8888
functions in a BDD test style. A sample Ginkgo test might look something like
89-
this ([`types_test.go`](examples/books/api/types_test.go.txt)):
89+
this:
9090

9191
```go
9292
package api_test
@@ -141,9 +141,7 @@ var _ = Describe("Books API Types", func() {
141141
This is perfectly fine for simple unit tests of Go code. However, once the
142142
tests begin to call multiple APIs or packages, the Ginkgo Go tests start to get
143143
cumbersome. Consider the following example of *functionally* testing the
144-
failure modes for a simple HTTP REST API endpoint
145-
([`failure_test.go`](https://github.com/gdt-dev/gdt-examples/blob/main/http/api/failure_test.go)):
146-
144+
failure modes for a simple HTTP REST API endpoint:
147145

148146
```go
149147
package api_test
@@ -257,8 +255,7 @@ var _ = Describe("Books API - GET /books failures", func() {
257255

258256
The above test code obscures what is being tested by cluttering the test
259257
assertions with the Go closures and accessor code. Compare the above with
260-
how `gdt` allows the test author to describe the same assertions
261-
([`failures.yaml`](https://github.com/gdt-dev/gdt-examples/blob/main/http/tests/api/failures.yaml)):
258+
how `gdt` allows the test author to describe the same assertions:
262259

263260
```yaml
264261
fixtures:
@@ -300,8 +297,7 @@ Consider a Ginkgo test case that checks the following behaviour:
300297
* The newly-created book's ID field is a valid UUID
301298
* The newly-created book's publisher has an address containing a known state code
302299

303-
A typical implementation of a Ginkgo test might look like this
304-
([`create_then_get_test.go`](https://github.com/gdt-dev/gdt-examples/blob/main/http/api/create_then_get_test.go)):
300+
A typical implementation of a Ginkgo test might look like this:
305301

306302
```go
307303
package api_test
@@ -381,8 +377,7 @@ var _ = Describe("Books API - POST /books -> GET /books from Location", func() {
381377
```
382378

383379
Compare the above test code to the following YAML document that a `gdt` user
384-
might create to describe the same assertions
385-
([`create_then_get.yaml`](https://github.com/gdt-dev/gdt-examples/blob/main/http/tests/api/create_then_get.yaml)):
380+
might create to describe the same assertions:
386381

387382
```yaml
388383
fixtures:
@@ -432,7 +427,7 @@ All `gdt` scenarios have the following fields:
432427
* `tests`: list of [`Spec`][basespec] specializations that represent the
433428
runnable test units in the test scenario.
434429

435-
[basespec]: https://github.com/gdt-dev/gdt/blob/ecee17249e1fa10147cf9191be0358923da44094/types/spec.go#L30
430+
[basespec]: https://github.com/gdt-dev/core/blob/023f92ee3468852d1d477df91cf42789e472b3b5/api/spec.go#L27-L48
436431

437432
The scenario's `tests` field is the most important and the [`Spec`][basespec]
438433
objects that it contains are the meat of a test scenario.
@@ -490,10 +485,10 @@ All test specs have the following fields:
490485
is used to execute the command and instead the operating system's `exec` family
491486
of calls is used.
492487

493-
[exec-plugin]: https://github.com/gdt-dev/gdt/tree/ecee17249e1fa10147cf9191be0358923da44094/plugin/exec
488+
[exec-plugin]: https://github.com/gdt-dev/core/tree/023f92ee3468852d1d477df91cf42789e472b3b5/plugin/exec
494489
[http-plugin]: https://github.com/gdt-dev/http
495490
[kube-plugin]: https://github.com/gdt-dev/kube
496-
[wait]: https://github.com/gdt-dev/gdt/blob/2791e11105fd3c36d1f11a7d111e089be7cdc84c/types/wait.go#L11-L25
491+
[wait]: https://github.com/gdt-dev/core/blob/023f92ee3468852d1d477df91cf42789e472b3b5/api/wait.go#L11-L25
497492

498493
#### `exec` test spec structure
499494

@@ -558,8 +553,8 @@ test spec also contains these fields:
558553
* `assert.err.none`: (optional) a string or list of strings of which *none
559554
should be present* in `stderr`.
560555

561-
[execspec]: https://github.com/gdt-dev/gdt/blob/2791e11105fd3c36d1f11a7d111e089be7cdc84c/exec/spec.go#L11-L34
562-
[pipeexpect]: https://github.com/gdt-dev/gdt/blob/2791e11105fd3c36d1f11a7d111e089be7cdc84c/exec/assertions.go#L15-L26
556+
[execspec]: https://github.com/gdt-dev/core/blob/023f92ee3468852d1d477df91cf42789e472b3b5/plugin/exec/spec.go#L11-L24
557+
[pipeexpect]: https://github.com/gdt-dev/core/blob/023f92ee3468852d1d477df91cf42789e472b3b5/plugin/exec/assertions.go#L30-L41
563558

564559
### Passing variables to subsequent test specs
565560

api/assertions.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

api/defaults.go

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)