best-dusk-6142
03/27/2024, 2:34 PMpackage e2e
import (
"os"
"path"
"testing"
"<http://github.com/pulumi/pulumi/pkg/v3/testing/integration|github.com/pulumi/pulumi/pkg/v3/testing/integration>"
)
func TestClusterCreation(t *testing.T) {
cwd, err := os.Getwd()
if err != nil {
t.FailNow()
}
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: path.Join(cwd, "../", "01-cluster"),
Quick: true,
SkipRefresh: true,
Verbose: true,
})
}
I ran this command PULUMI_TEST_DEBUG_LOG_LEVEL=9 go test -v ./e2e
And i got this error:
=== RUN TestClusterCreation
=== PAUSE TestClusterCreation
=== CONT TestClusterCreation
program.go:1935: sample: /Users/ulysse.fontaine/Octo/dojo-investigation-kubernetes/01-cluster
program.go:1940: pulumi: /opt/homebrew/bin/pulumi
program.go:1086: acquired yarn install lock
command.go:46: **** Invoke '/opt/homebrew/bin/yarn install' in '/var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/p-it-amafh4nw9h-01-cluster-77c45e92-3322497897'
yarn install v1.22.22
warning package.json: No license field
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning cluster.dkusr: No license field
[1/4] Resolving packages...
warning @pulumi/pulumi > @opentelemetry/instrumentation > @opentelemetry/api-metrics@0.32.0: Please use @opentelemetry/api >= 1.3.0
warning @pulumi/pulumi > @opentelemetry/instrumentation-grpc > @opentelemetry/api-metrics@0.32.0: Please use @opentelemetry/api >= 1.3.0
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 42.25s.
command.go:121: Command completed without output
program.go:1112: released yarn install lock
program.go:2085: projdir: /var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/p-it-amafh4nw9h-01-cluster-77c45e92-3322497897
program.go:1336: Initializing project (dir /var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/p-it-amafh4nw9h-01-cluster-77c45e92-3322497897; stack p-it-amafh4nw9h-01-cluster-77c45e92)
command.go:46: **** Invoke '/opt/homebrew/bin/pulumi --logflow --logtostderr -v=9 login --cloud-url file:///var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/TestClusterCreation1686706941/001' in '/var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/p-it-amafh4nw9h-01-cluster-77c45e92-3322497897'
Logged in to AMAFH4NW9HXFM as ulysse.fontaine (file:///var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/TestClusterCreation1686706941/001)
command.go:121: Command completed without output
command.go:46: **** Invoke '/opt/homebrew/bin/pulumi --logflow --logtostderr -v=9 stack init p-it-amafh4nw9h-01-cluster-77c45e92' in '/var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/p-it-amafh4nw9h-01-cluster-77c45e92-3322497897'
I0327 15:23:16.962283 84321 sink.go:178] defaultSink::Error(error: read ".pulumi/meta.yaml": blob (key ".pulumi/meta.yaml") (code=Unknown): AccessDenied: Access Denied
status code: 403, request id: txg60eb60decea34619a52e-0066042bd5, host id: txg60eb60decea34619a52e-0066042bd5)
error: read ".pulumi/meta.yaml": blob (key ".pulumi/meta.yaml") (code=Unknown): AccessDenied: Access Denied
status code: 403, request id: txg60eb60decea34619a52e-0066042bd5, host id: txg60eb60decea34619a52e-0066042bd5
command.go:98: Invoke '/opt/homebrew/bin/pulumi --logflow --logtostderr -v=9 stack init p-it-amafh4nw9h-01-cluster-77c45e92' failed: exit status 255
command.go:121: Command completed without output
program.go:852:
Error Trace: /Users/ulysse.fontaine/go/pkg/mod/github.com/pulumi/pulumi/pkg/v3@v3.111.1/testing/integration/program.go:852
/Users/ulysse.fontaine/Octo/dojo-investigation-kubernetes/e2e/cluster_test.go:17
Error: Received unexpected error:
initializing test project: exit status 255
Test: TestClusterCreation
--- FAIL: TestClusterCreation (86.29s)
FAIL
FAIL <http://gitlab.com/octo-technology/octo-ops/dojo-investigation-kubernetes/e2e|gitlab.com/octo-technology/octo-ops/dojo-investigation-kubernetes/e2e> 86.924s
FAIL
I feal like it's some permission problem (due to the 403 and AccessDenied error), but I can't figure it out !
The folder /var/folders/xj/zn3q9lbj7rnbcb069q75vs7r0000gn/T/TestClusterCreation1686706941/001
is created but empty during the tests. Is it beaucoup there is no .pulumi
folder in it ?fast-sandwich-30809
03/27/2024, 3:47 PM/var
, which is generally owned by root - but your yarn install
seems to run "fine" (ignoring unrelated warnings).fast-sandwich-30809
03/27/2024, 3:48 PMbest-dusk-6142
03/27/2024, 3:58 PM/Users/ulysse.fontaine/Octo/dojo-investigation-kubernetes/
But when running integration tests, pulumi creates temporary folders. Thoses are created using system library and return a folder in /var/folder
I checked permissions on that and they seam right. I'm currently investigating if the issue come from stack creation parametersbest-dusk-6142
03/27/2024, 4:20 PMminiature-musician-31262
04/04/2024, 11:36 PM