-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from akamai/release/1.0.0
Cli-test-center GA Release 1.0.0
- Loading branch information
Showing
99 changed files
with
9,090 additions
and
5,112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{ | ||
"requirements": { | ||
"go": "1.15" | ||
}, | ||
"commands": [{ | ||
"name": "test-center", | ||
"version": "0.2.0", | ||
"description": "Test Center is a testing tool that checks the effect of configuration changes on your web property. Use this tool as part of your testing protocol to increase your confidence in the safety and accuracy of your configuration changes.", | ||
"bin": "https://github.com/akamai/cli-test-center/releases/download/{{.Version}}/akamai-{{.Name}}-{{.Version}}-{{.OS}}{{.Arch}}{{.BinSuffix}}" | ||
}] | ||
"requirements": { | ||
"go": ">=1.15" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "test-center", | ||
"version": "1.0.0", | ||
"description": "Test Center is a testing tool that checks the effect of configuration changes on your web property. Use this tool as part of your testing protocol to increase your confidence in the safety and accuracy of your configuration changes.", | ||
"bin": "https://github.com/akamai/cli-test-center/releases/download/{{.Version}}/akamai-{{.Name}}-{{.Version}}-{{.OS}}{{.Arch}}{{.BinSuffix}}" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
package cmd | ||
|
||
import ( | ||
internalconstant "github.com/akamai/cli-test-center/internal/constant" | ||
"github.com/akamai/cli-test-center/internal/util" | ||
"github.com/akamai/cli-test-center/internal/validator" | ||
externalconstant "github.com/akamai/cli-test-center/user/constant" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var condCmd = &cobra.Command{ | ||
Use: externalconstant.ConditionUse, | ||
Aliases: []string{externalconstant.ConditionCommandAliases}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
globalValidator := validator.NewGlobalValidator(cmd, jsonData) | ||
// validate subcommand | ||
globalValidator.ValidateParentSubCommands(cmd, args, false) | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(condCmd) | ||
|
||
condCmd.Short = util.GetMessageForKey(condCmd, internalconstant.Short) | ||
condCmd.Long = util.GetMessageForKey(condCmd, internalconstant.Long) | ||
} |
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,34 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/akamai/cli-test-center/internal/api" | ||
internalconstant "github.com/akamai/cli-test-center/internal/constant" | ||
"github.com/akamai/cli-test-center/internal/service" | ||
"github.com/akamai/cli-test-center/internal/util" | ||
"github.com/akamai/cli-test-center/internal/validator" | ||
externalconstant "github.com/akamai/cli-test-center/user/constant" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var condListCmd = &cobra.Command{ | ||
Use: externalconstant.ConditionListUse, | ||
Example: externalconstant.ConditionListExample, | ||
Aliases: []string{externalconstant.ConditionListCommandAliases}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
eghc := api.NewEdgeGridHttpClient(config, accountSwitchKey) | ||
api := api.NewApiClient(*eghc) | ||
svc := service.NewService(*api, cmd, jsonOutput) | ||
globalValidator := validator.NewGlobalValidator(cmd, jsonData) | ||
// validate subcommand | ||
globalValidator.ValidateSubCommandsNotAllowed(cmd, args, false) | ||
|
||
svc.GetConditionListAndPrintResult(cmd) | ||
}, | ||
} | ||
|
||
func init() { | ||
condCmd.AddCommand(condListCmd) | ||
|
||
condListCmd.Short = util.GetMessageForKey(condListCmd, internalconstant.Short) | ||
condListCmd.Long = util.GetMessageForKey(condListCmd, internalconstant.Long) | ||
} |
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,33 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/akamai/cli-test-center/internal/api" | ||
internalconstant "github.com/akamai/cli-test-center/internal/constant" | ||
"github.com/akamai/cli-test-center/internal/service" | ||
"github.com/akamai/cli-test-center/internal/util" | ||
"github.com/akamai/cli-test-center/internal/validator" | ||
externalconstant "github.com/akamai/cli-test-center/user/constant" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var condTemplateCmd = &cobra.Command{ | ||
Use: externalconstant.ConditionTemplateUse, | ||
Example: externalconstant.ConditionTemplateExample, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
eghc := api.NewEdgeGridHttpClient(config, accountSwitchKey) | ||
api := api.NewApiClient(*eghc) | ||
svc := service.NewService(*api, cmd, jsonOutput) | ||
globalValidator := validator.NewGlobalValidator(cmd, jsonData) | ||
// validate subcommand | ||
globalValidator.ValidateSubCommandsNotAllowed(cmd, args, false) | ||
|
||
svc.GetConditionTemplateAndPrintResult(cmd) | ||
}, | ||
} | ||
|
||
func init() { | ||
condCmd.AddCommand(condTemplateCmd) | ||
|
||
condTemplateCmd.Short = util.GetMessageForKey(condTemplateCmd, internalconstant.Short) | ||
condTemplateCmd.Long = util.GetMessageForKey(condTemplateCmd, internalconstant.Long) | ||
} |
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
package cmd | ||
|
||
import ( | ||
internalconstant "github.com/akamai/cli-test-center/internal/constant" | ||
"github.com/akamai/cli-test-center/internal/model" | ||
"github.com/akamai/cli-test-center/internal/util" | ||
"github.com/akamai/cli-test-center/internal/validator" | ||
externalconstant "github.com/akamai/cli-test-center/user/constant" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var tryFunction model.TryFunction | ||
|
||
var functionCmd = &cobra.Command{ | ||
Use: externalconstant.FunctionUse, | ||
Aliases: []string{externalconstant.FunctionAliases}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
globalValidator := validator.NewGlobalValidator(cmd, jsonData) | ||
globalValidator.ValidateParentSubCommands(cmd, args, false) | ||
}, | ||
} | ||
|
||
func init() { | ||
|
||
rootCmd.AddCommand(functionCmd) | ||
createTestCaseCmd.Flags().SortFlags = false | ||
|
||
functionCmd.Short = util.GetMessageForKey(functionCmd, internalconstant.Short) | ||
functionCmd.Long = util.GetMessageForKey(functionCmd, internalconstant.Long) | ||
} |
Oops, something went wrong.