stacks: fix suggested command when lock file is out of date (#35616)

pull/35623/head
Liam Cervante 2 years ago committed by GitHub
parent 02c2aae12d
commit 7660d8d086
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -91,7 +91,7 @@ func CheckProviderInLockfile(locks depsfile.Locks, providerType *ProviderType, d
Severity: hcl.DiagError,
Summary: "Provider missing from lockfile",
Detail: fmt.Sprintf(
"Provider %q is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks provider lock` to update the lockfile and run this operation again with an updated configuration.",
"Provider %q is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks providers lock` to update the lockfile and run this operation again with an updated configuration.",
providerType.Addr(),
),
Subject: declRange.ToHCL().Ptr(),

@ -486,7 +486,7 @@ func TestValidate_missing_provider_from_lockfile(t *testing.T) {
t.Fatalf("expected diagnostic summary 'Provider missing from lockfile', got %q", diag.Description().Summary)
}
if diag.Description().Detail != "Provider \"registry.terraform.io/hashicorp/testing\" is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks provider lock` to update the lockfile and run this operation again with an updated configuration." {
if diag.Description().Detail != "Provider \"registry.terraform.io/hashicorp/testing\" is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks providers lock` to update the lockfile and run this operation again with an updated configuration." {
t.Fatalf("expected diagnostic detail to be a specific message, got %q", diag.Description().Detail)
}
}

Loading…
Cancel
Save