summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'client/go/cmd/testdata')
-rw-r--r--client/go/cmd/testdata/tests/expected-suite.out111
-rw-r--r--client/go/cmd/testdata/tests/expected.out3
-rw-r--r--client/go/cmd/testdata/tests/system-test/test.json3
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-bool-value.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-element-count.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-field-name.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-float-value.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-int-value.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-null-value.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-string-value.json2
-rw-r--r--client/go/cmd/testdata/tests/system-test/wrong-type.json15
11 files changed, 107 insertions, 39 deletions
diff --git a/client/go/cmd/testdata/tests/expected-suite.out b/client/go/cmd/testdata/tests/expected-suite.out
index 0fb8b897f4f..f214f3cf160 100644
--- a/client/go/cmd/testdata/tests/expected-suite.out
+++ b/client/go/cmd/testdata/tests/expected-suite.out
@@ -1,7 +1,8 @@
-Running testdata/tests/system-test/test.json: .... OK!
-Running testdata/tests/system-test/wrong-bool-value.json:
-Failed verifying assertion 0:
-Expected JSON at /root/coverage/full (false) does not match actual (true). Response body:
+Running my test: .... OK
+Running testdata/tests/system-test/wrong-bool-value.json: Failed step 1:
+Unexpected value at /root/coverage/full: true
+Expected: false
+Actual response:
{
"root": {
"children": [
@@ -36,9 +37,11 @@ Expected JSON at /root/coverage/full (false) does not match actual (true). Respo
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-element-count.json:
-Failed verifying assertion 0:
-Expected number of elements at /root/children (0) does not match actual (1). Response body:
+
+Running testdata/tests/system-test/wrong-element-count.json: Failed step 1:
+Unexpected number of elements at /root/children: 1
+Expected: 0
+Actual response:
{
"root": {
"children": [
@@ -73,9 +76,10 @@ Expected number of elements at /root/children (0) does not match actual (1). Res
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-field-name.json:
-Failed verifying assertion 0:
-Expected field at /root/fields/totalCountDracula not present in actual data. Response body:
+
+Running testdata/tests/system-test/wrong-field-name.json: Failed step 1:
+Missing expected field at /root/fields/totalCountDracula
+Actual response:
{
"root": {
"children": [
@@ -110,9 +114,11 @@ Expected field at /root/fields/totalCountDracula not present in actual data. Res
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-float-value.json:
-Failed verifying assertion 0:
-Expected JSON at /root/children/0/relevance (0.381862373599) does not match actual (0.38186238359951247). Response body:
+
+Running testdata/tests/system-test/wrong-float-value.json: Failed step 1:
+Unexpected value at /root/children/0/relevance: 0.38186238359951247
+Expected: 0.381862373599
+Actual response:
{
"root": {
"children": [
@@ -147,9 +153,11 @@ Expected JSON at /root/children/0/relevance (0.381862373599) does not match actu
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-int-value.json:
-Failed verifying assertion 0:
-Expected JSON at /root/fields/totalCount (2) does not match actual (1). Response body:
+
+Running testdata/tests/system-test/wrong-int-value.json: Failed step 1:
+Unexpected value at /root/fields/totalCount: 1
+Expected: 2
+Actual response:
{
"root": {
"children": [
@@ -184,9 +192,10 @@ Expected JSON at /root/fields/totalCount (2) does not match actual (1). Response
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-null-value.json:
-Failed verifying assertion 0:
-Expected field at /boot not present in actual data. Response body:
+
+Running testdata/tests/system-test/wrong-null-value.json: Failed step 1:
+Missing expected field at /boot
+Actual response:
{
"root": {
"children": [
@@ -221,9 +230,50 @@ Expected field at /boot not present in actual data. Response body:
"summaryfetchtime": 0
}
}
-Running testdata/tests/system-test/wrong-string-value.json:
-Failed verifying assertion 0:
-Expected JSON at /root/children/0/fields/artist ("Boo Fighters") does not match actual ("Foo Fighters"). Response body:
+
+Running testdata/tests/system-test/wrong-string-value.json: Failed step 1:
+Unexpected value at /root/children/0/fields/artist: "Foo Fighters"
+Expected: "Boo Fighters"
+Actual response:
+{
+ "root": {
+ "children": [
+ {
+ "fields": {
+ "artist": "Foo Fighters",
+ "documentid": "id:test:music::doc",
+ "sddocname": "music"
+ },
+ "id": "id:test:music::doc",
+ "relevance": 0.38186238359951247,
+ "source": "music"
+ }
+ ],
+ "coverage": {
+ "coverage": 100,
+ "documents": 1,
+ "full": true,
+ "nodes": 1,
+ "results": 1,
+ "resultsFull": 1
+ },
+ "fields": {
+ "totalCount": 1
+ },
+ "id": "toplevel",
+ "relevance": 1
+ },
+ "timing": {
+ "querytime": 0.003,
+ "searchtime": 0.004,
+ "summaryfetchtime": 0
+ }
+}
+
+Running testdata/tests/system-test/wrong-type.json: Failed step 1:
+Unexpected type at /root/fields/totalCount: 1
+Expected: "1"
+Actual response:
{
"root": {
"children": [
@@ -259,11 +309,12 @@ Expected JSON at /root/children/0/fields/artist ("Boo Fighters") does not match
}
}
-Failed 7 of 8 tests:
-testdata/tests/system-test/wrong-bool-value.json: assertion 0
-testdata/tests/system-test/wrong-element-count.json: assertion 0
-testdata/tests/system-test/wrong-field-name.json: assertion 0
-testdata/tests/system-test/wrong-float-value.json: assertion 0
-testdata/tests/system-test/wrong-int-value.json: assertion 0
-testdata/tests/system-test/wrong-null-value.json: assertion 0
-testdata/tests/system-test/wrong-string-value.json: assertion 0
+Failed 8 of 9 tests:
+testdata/tests/system-test/wrong-bool-value.json: step 1: Unexpected value at /root/coverage/full: true
+testdata/tests/system-test/wrong-element-count.json: step 1: Unexpected number of elements at /root/children: 1
+testdata/tests/system-test/wrong-field-name.json: step 1: Missing expected field at /root/fields/totalCountDracula
+testdata/tests/system-test/wrong-float-value.json: step 1: Unexpected value at /root/children/0/relevance: 0.38186238359951247
+testdata/tests/system-test/wrong-int-value.json: step 1: Unexpected value at /root/fields/totalCount: 1
+testdata/tests/system-test/wrong-null-value.json: step 1: Missing expected field at /boot
+testdata/tests/system-test/wrong-string-value.json: step 1: Unexpected value at /root/children/0/fields/artist: "Foo Fighters"
+testdata/tests/system-test/wrong-type.json: step 1: Unexpected type at /root/fields/totalCount: 1
diff --git a/client/go/cmd/testdata/tests/expected.out b/client/go/cmd/testdata/tests/expected.out
index f012ee30e95..b41f001cd25 100644
--- a/client/go/cmd/testdata/tests/expected.out
+++ b/client/go/cmd/testdata/tests/expected.out
@@ -1,2 +1,3 @@
-Running testdata/tests/system-test/test.json: .... OK!
+Running my test: .... OK
+
1 tests completed successfully
diff --git a/client/go/cmd/testdata/tests/system-test/test.json b/client/go/cmd/testdata/tests/system-test/test.json
index 5aac76d29ff..f53df929dbd 100644
--- a/client/go/cmd/testdata/tests/system-test/test.json
+++ b/client/go/cmd/testdata/tests/system-test/test.json
@@ -1,11 +1,12 @@
{
+ "name": "my test",
"defaults": {
"cluster": "container",
"parameters": {
"timeout": "3.4s"
}
},
- "assertions": [
+ "steps": [
{
"name": "feed music",
"request": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-bool-value.json b/client/go/cmd/testdata/tests/system-test/wrong-bool-value.json
index ae6f9de8de8..c594a206347 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-bool-value.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-bool-value.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-element-count.json b/client/go/cmd/testdata/tests/system-test/wrong-element-count.json
index 77c687fa919..a772af67a78 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-element-count.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-element-count.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-field-name.json b/client/go/cmd/testdata/tests/system-test/wrong-field-name.json
index d020141ed12..6ce3d055584 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-field-name.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-field-name.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-float-value.json b/client/go/cmd/testdata/tests/system-test/wrong-float-value.json
index 804f2582176..6a1b221a91a 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-float-value.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-float-value.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-int-value.json b/client/go/cmd/testdata/tests/system-test/wrong-int-value.json
index 3cbf8acd1d8..d61a8b002c2 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-int-value.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-int-value.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-null-value.json b/client/go/cmd/testdata/tests/system-test/wrong-null-value.json
index 11425df7ad4..ea78357c99e 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-null-value.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-null-value.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-string-value.json b/client/go/cmd/testdata/tests/system-test/wrong-string-value.json
index 2cf0a5fdb38..5f56ebaab6d 100644
--- a/client/go/cmd/testdata/tests/system-test/wrong-string-value.json
+++ b/client/go/cmd/testdata/tests/system-test/wrong-string-value.json
@@ -1,5 +1,5 @@
{
- "assertions": [
+ "steps": [
{
"response": {
"body": {
diff --git a/client/go/cmd/testdata/tests/system-test/wrong-type.json b/client/go/cmd/testdata/tests/system-test/wrong-type.json
new file mode 100644
index 00000000000..6be28ff68ff
--- /dev/null
+++ b/client/go/cmd/testdata/tests/system-test/wrong-type.json
@@ -0,0 +1,15 @@
+{
+ "steps": [
+ {
+ "response": {
+ "body": {
+ "root": {
+ "fields": {
+ "totalCount" : "1"
+ }
+ }
+ }
+ }
+ }
+ ]
+}