Skip to content

Commit

Permalink
Tidy test resources
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannegele committed Oct 6, 2023
1 parent 236eaf0 commit c4da16b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
10 changes: 5 additions & 5 deletions dataContract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func TestGetValue(t *testing.T) {
model, _ := os.ReadFile("./test_resources/model.yaml")
model, _ := os.ReadFile("./test_resources/dataContract/getValue/model.yaml")

type args struct {
contract DataContract
Expand Down Expand Up @@ -53,7 +53,7 @@ func TestGetValue(t *testing.T) {
name: "local reference",
args: args{
contract: DataContract{"schema": map[string]interface{}{
"specification": "$ref: test_resources/model.yaml",
"specification": "$ref: test_resources/dataContract/getValue/model.yaml",
}},
path: []string{"schema", "specification"}},
wantValue: string(model),
Expand All @@ -63,7 +63,7 @@ func TestGetValue(t *testing.T) {
name: "remote reference",
args: args{
contract: DataContract{"schema": map[string]interface{}{
"specification": fmt.Sprintf("$ref: %v/model.yaml", TestResourcesServer.URL),
"specification": fmt.Sprintf("$ref: %v/dataContract/getValue/model.yaml", TestResourcesServer.URL),
}},
path: []string{"schema", "specification"}},
wantValue: string(model),
Expand Down Expand Up @@ -104,12 +104,12 @@ func TestGetDataContract(t *testing.T) {
}{
{
name: "local",
args: args{location: "test_resources/datacontract.yaml"},
args: args{location: "test_resources/dataContract/getDataContract/datacontract.yaml"},
wantDataContractObject: dataContract,
},
{
name: "remote",
args: args{location: fmt.Sprintf("%v/datacontract.yaml", TestResourcesServer.URL)},
args: args{location: fmt.Sprintf("%v/dataContract/getDataContract/datacontract.yaml", TestResourcesServer.URL)},
wantDataContractObject: dataContract,
},
}
Expand Down
5 changes: 0 additions & 5 deletions test_resources/datacontract.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions test_resources/model.yaml

This file was deleted.

0 comments on commit c4da16b

Please sign in to comment.