Skip to content

Commit

Permalink
chore(test): switch integration tests to old-cli style
Browse files Browse the repository at this point in the history
for now we are more interested in reliability of the old-style
(to not break anything).

In a later stage we can revert this commit to switch the tests to
the new cli again.
  • Loading branch information
Tieske committed Oct 25, 2023
1 parent 5dcc32a commit 19ef437
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integration/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func testKongState(t *testing.T, client *kong.Client, isKonnect bool,

func reset(t *testing.T, opts ...string) {
deckCmd := cmd.NewRootCmd()
args := []string{"gateway", "reset", "--force"}
args := []string{"reset", "--force"}
if len(opts) > 0 {
args = append(args, opts...)
}
Expand Down Expand Up @@ -248,7 +248,7 @@ func setup(t *testing.T) {

func sync(kongFile string, opts ...string) error {
deckCmd := cmd.NewRootCmd()
args := []string{"gateway", "sync", kongFile}
args := []string{"sync", "-s", kongFile}
if len(opts) > 0 {
args = append(args, opts...)
}
Expand All @@ -258,7 +258,7 @@ func sync(kongFile string, opts ...string) error {

func diff(kongFile string, opts ...string) (string, error) {
deckCmd := cmd.NewRootCmd()
args := []string{"gateway", "diff", kongFile}
args := []string{"diff", "-s", kongFile}
if len(opts) > 0 {
args = append(args, opts...)
}
Expand All @@ -280,7 +280,7 @@ func diff(kongFile string, opts ...string) (string, error) {

func dump(opts ...string) (string, error) {
deckCmd := cmd.NewRootCmd()
args := []string{"gateway", "dump", "-o=kong"}
args := []string{"dump"}
if len(opts) > 0 {
args = append(args, opts...)
}
Expand Down Expand Up @@ -324,7 +324,7 @@ func lint(opts ...string) (string, error) {

func ping(opts ...string) error {
deckCmd := cmd.NewRootCmd()
args := []string{"gateway", "ping"}
args := []string{"ping"}
if len(opts) > 0 {
args = append(args, opts...)
}
Expand Down

0 comments on commit 19ef437

Please sign in to comment.