-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use examples to test module functions
- Loading branch information
Showing
20 changed files
with
95 additions
and
92 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,2 +1,4 @@ | ||
dagger.gen.go | ||
helm/dagger/internal | ||
go.work | ||
go.work.sum |
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 |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
"source": "../helm" | ||
} | ||
], | ||
"source": "dagger", | ||
"source": ".", | ||
"engineVersion": "v0.11.6" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,35 +1,41 @@ | ||
module dagger/examples | ||
module dagger/apko/tests | ||
|
||
go 1.22.3 | ||
go 1.22.2 | ||
|
||
require ( | ||
github.com/99designs/gqlgen v0.17.44 | ||
github.com/99designs/gqlgen v0.17.46 | ||
github.com/Khan/genqlient v0.7.0 | ||
github.com/sourcegraph/conc v0.3.0 | ||
github.com/vektah/gqlparser/v2 v2.5.11 | ||
go.opentelemetry.io/otel v1.26.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 | ||
go.opentelemetry.io/otel/sdk v1.26.0 | ||
go.opentelemetry.io/otel/trace v1.26.0 | ||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa | ||
go.opentelemetry.io/otel v1.24.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 | ||
go.opentelemetry.io/otel/sdk v1.24.0 | ||
go.opentelemetry.io/otel/trace v1.24.0 | ||
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 | ||
golang.org/x/sync v0.7.0 | ||
google.golang.org/grpc v1.63.2 | ||
) | ||
|
||
require ( | ||
go.uber.org/atomic v1.7.0 // indirect | ||
go.uber.org/multierr v1.9.0 // indirect | ||
) | ||
|
||
require ( | ||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect | ||
github.com/go-logr/logr v1.4.1 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/google/uuid v1.6.0 // indirect | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect | ||
github.com/sosodev/duration v1.2.0 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect | ||
go.opentelemetry.io/otel/metric v1.26.0 // indirect | ||
github.com/sosodev/duration v1.3.0 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect | ||
go.opentelemetry.io/otel/metric v1.24.0 // indirect | ||
go.opentelemetry.io/proto/otlp v1.2.0 // indirect | ||
golang.org/x/net v0.23.0 // indirect | ||
golang.org/x/sys v0.19.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/net v0.25.0 // indirect | ||
golang.org/x/sys v0.20.0 // indirect | ||
golang.org/x/text v0.15.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect | ||
google.golang.org/protobuf v1.33.0 // indirect | ||
google.golang.org/protobuf v1.34.0 // indirect | ||
) |
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,40 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/sourcegraph/conc/pool" | ||
) | ||
|
||
type Examples struct{} | ||
|
||
// All executes all tests. | ||
func (m *Examples) All(ctx context.Context) error { | ||
p := pool.New().WithErrors().WithContext(ctx) | ||
|
||
p.Go(m.Version) | ||
|
||
return p.Wait() | ||
} | ||
|
||
func (m *Examples) Version( | ||
// method call context | ||
ctx context.Context, | ||
) error { | ||
const expected = "0.1.1" | ||
|
||
// dagger call version --directory ./mychart/ | ||
directory := dag.CurrentModule().Source().Directory("testdata/mychart/") | ||
version, err := dag.Helm().Version(ctx, directory) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
if version != expected { | ||
return fmt.Errorf("expected %q, got %q", expected, version) | ||
} | ||
|
||
return nil | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.