Skip to content

Conversation

@siherrmann
Copy link
Member

siherrmann and others added 2 commits December 18, 2025 15:37
Signed-off-by: siherrmann <25087590+siherrmann@users.noreply.github.com>
c.cmd.Flags().BoolVarP(&c.Opts.Quiet, "quiet", "q", false, "Suppress progress logging")
c.cmd.Flags().DurationVar(&c.Opts.Timeout, "timeout", defaultTimeout, "Timeout for the entire smoke test")
c.cmd.Flags().StringVar(&c.Opts.Profile, "profile", defaultProfile, "CI profile to use for landscape and pipeline")
c.cmd.Flags().StringVar(&c.Opts.Steps, "steps", "", "Comma-separated list of steps to run (createWorkspace,setEnvVar,createFiles,syncLandscape,startPipeline,deleteWorkspace). If empty, all steps including deleteWorkspace are run. If specified without deleteWorkspace, the workspace will be kept for manual inspection.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to generate the list of possible values from the constants defined above somehow?

for _, step := range steps {
switch step {
case stepCreateWorkspace:
if err = c.stepCreateWorkspace(ctx, teamID, planID, workspaceName, &workspaceID); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they all seem to implement the same interface, would it make sense to collect them in something like a map[TestStep]TestStepFunc and iterate here (could be helpful for automatically listing them in the help output too)?


func (c *SmoketestCodesphereCmd) logf(format string, args ...interface{}) {
if !c.Opts.Quiet {
fmt.Printf(format, args...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we want to move to log.... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants