-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5d6f19
commit b90fa03
Showing
21 changed files
with
11,374 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package integration_test | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/grafana/grizzly/pkg/testutil" | ||
) | ||
|
||
func TestFormats(t *testing.T) { | ||
ticker := testutil.PingService(testutil.GetUrl()) | ||
defer ticker.Stop() | ||
|
||
tests := []struct { | ||
Name string | ||
PushCmd string | ||
Expected string | ||
}{ | ||
{ | ||
Name: "Read json/flat/onlyspec, write json/dirs/spec", | ||
PushCmd: "push -s -k Dashboard -f general json/flat/onlyspec", | ||
Expected: "json/dirs/spec", | ||
}, | ||
} | ||
grizzlyTests := []GrizzlyTest{} | ||
for _, test := range tests { | ||
grizzlyTest := GrizzlyTest{ | ||
Name: test.Name, | ||
TestDir: "testdata/formats", | ||
Commands: []Command{ | ||
{ | ||
Command: "./start-grafana.sh", | ||
}, | ||
{ | ||
Arguments: test.PushCmd, | ||
ExpectedCode: 0, | ||
ExpectedError: nil, | ||
}, | ||
{ | ||
Arguments: "pull temp", | ||
ExpectedCode: 0, | ||
ExpectedError: nil, | ||
}, | ||
{ | ||
Command: "diff", | ||
Arguments: fmt.Sprintf("-ur temp %s", test.Expected), | ||
ExpectedCode: 0, | ||
ExpectedError: nil, | ||
}, | ||
}, | ||
} | ||
grizzlyTests = append(grizzlyTests, grizzlyTest) | ||
} | ||
RunTests(t, grizzlyTests) | ||
} |
Oops, something went wrong.