Skip to content

Commit c50c293

Browse files
fix: fixed non-functional --disable-mockserver flag for testing
1 parent 377e2d2 commit c50c293

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ require (
3434
github.com/sethvargo/go-githubactions v1.1.0
3535
github.com/speakeasy-api/huh v1.1.2
3636
github.com/speakeasy-api/openapi v0.2.3
37-
github.com/speakeasy-api/openapi-generation/v2 v2.647.1
37+
github.com/speakeasy-api/openapi-generation/v2 v2.647.2
3838
github.com/speakeasy-api/openapi-overlay v0.10.1
3939
github.com/speakeasy-api/sdk-gen-config v1.31.1
4040
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ github.com/speakeasy-api/libopenapi v0.21.8-fixhiddencomps-fixed h1:wnCsprnR6nlo
581581
github.com/speakeasy-api/libopenapi v0.21.8-fixhiddencomps-fixed/go.mod h1:Gc8oQkjr2InxwumK0zOBtKN9gIlv9L2VmSVIUk2YxcU=
582582
github.com/speakeasy-api/openapi v0.2.3 h1:jxeYXcAn1r5PyUZzXeG7T65hpJMcdTg84nDF0YUCdAw=
583583
github.com/speakeasy-api/openapi v0.2.3/go.mod h1:vqBYh4eIgL9mVqrtdbuttji0ggR3/4xqU1ief4rjzY4=
584-
github.com/speakeasy-api/openapi-generation/v2 v2.647.1 h1:QID5TplB5smuDamARAYgoUF+cavs5r6bsaV5KRfzEik=
585-
github.com/speakeasy-api/openapi-generation/v2 v2.647.1/go.mod h1:jvi4wIrasRMSARbGz2I784+VAmcWVocW9ifiDSXMFaY=
584+
github.com/speakeasy-api/openapi-generation/v2 v2.647.2 h1:3Rej150bVf+Q6g3NNXkIJLnqP+uLd1zH+XipxQRLUdw=
585+
github.com/speakeasy-api/openapi-generation/v2 v2.647.2/go.mod h1:jvi4wIrasRMSARbGz2I784+VAmcWVocW9ifiDSXMFaY=
586586
github.com/speakeasy-api/openapi-overlay v0.10.1 h1:XFx/GvJvtAGf4dcQ6bxzsLNf76x/QWE2X0SSZrWojBQ=
587587
github.com/speakeasy-api/openapi-overlay v0.10.1/go.mod h1:n0iOU7AqKpNFfEt6tq7qYITC4f0yzVVdFw0S7hukemg=
588588
github.com/speakeasy-api/sdk-gen-config v1.31.1 h1:peGHmojOH4OzCpKHoaQ++a7J6hLy6iOpWjoBtxwHykY=

internal/testcmd/runner.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ func (r *Runner) RunWithVisualization(ctx context.Context) error {
102102
}
103103

104104
err := r.workflowTracker.RunWithVisualization(runFnCli, updatesChannel)
105-
106105
if err != nil {
107106
logger.Errorf("Workflow testing failed: %s", err)
108107
}
@@ -165,6 +164,10 @@ func (r *Runner) prepareGenerator(ctx context.Context) (*generate.Generator, err
165164
generate.WithRunLocation(runLocation),
166165
}
167166

167+
if r.disableMockserver {
168+
generatorOpts = append(generatorOpts, generate.WithDisableMockServer())
169+
}
170+
168171
// The generator verbose output option, regardless of given value, also
169172
// resets the logger in the generator, so only set when enabled. Otherwise,
170173
// output can interleave/format incorrectly.
@@ -173,7 +176,6 @@ func (r *Runner) prepareGenerator(ctx context.Context) (*generate.Generator, err
173176
}
174177

175178
generator, err := generate.New(generatorOpts...)
176-
177179
if err != nil {
178180
return nil, fmt.Errorf("Unable to prepare testing instance: %w", err)
179181
}
@@ -230,7 +232,6 @@ func (r *Runner) runSingleWorkflowTargetTesting(ctx context.Context, workflowTar
230232
testingCtx := log.With(ctx, testingLogger)
231233

232234
generator, err := r.prepareGenerator(testingCtx)
233-
234235
if err != nil {
235236
return err
236237
}

0 commit comments

Comments
 (0)