mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
keep init wording consistent in internal/command/init.go (#855)
Signed-off-by: haojue <acewhj@gmail.com>
This commit is contained in:
parent
6366b2dbf6
commit
084c5dfc8b
@ -264,7 +264,7 @@ func (c *InitCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
// We've passed the core version check, now we can show errors from the
|
||||
// configuration and backend initialisation.
|
||||
// configuration and backend initialization.
|
||||
|
||||
// Now, we can check the diagnostics from the early configuration and the
|
||||
// backend.
|
||||
@ -1207,7 +1207,7 @@ func (c *InitCommand) Synopsis() string {
|
||||
}
|
||||
|
||||
const errInitConfigError = `
|
||||
[reset]OpenTofu encountered problems during initialisation, including problems
|
||||
[reset]OpenTofu encountered problems during initialization, including problems
|
||||
with the configuration, described below.
|
||||
|
||||
The OpenTofu configuration must be valid before initialization so that
|
||||
|
@ -2641,7 +2641,7 @@ func TestInit_invalidSyntaxNoBackend(t *testing.T) {
|
||||
}
|
||||
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if subStr := "OpenTofu encountered problems during initialisation, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
if subStr := "OpenTofu encountered problems during initialization, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
t.Errorf("Error output should include preamble\nwant substr: %s\ngot:\n%s", subStr, errStr)
|
||||
}
|
||||
if subStr := "Error: Unsupported block type"; !strings.Contains(errStr, subStr) {
|
||||
@ -2670,7 +2670,7 @@ func TestInit_invalidSyntaxWithBackend(t *testing.T) {
|
||||
}
|
||||
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if subStr := "OpenTofu encountered problems during initialisation, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
if subStr := "OpenTofu encountered problems during initialization, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
t.Errorf("Error output should include preamble\nwant substr: %s\ngot:\n%s", subStr, errStr)
|
||||
}
|
||||
if subStr := "Error: Unsupported block type"; !strings.Contains(errStr, subStr) {
|
||||
@ -2699,7 +2699,7 @@ func TestInit_invalidSyntaxInvalidBackend(t *testing.T) {
|
||||
}
|
||||
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if subStr := "OpenTofu encountered problems during initialisation, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
if subStr := "OpenTofu encountered problems during initialization, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
t.Errorf("Error output should include preamble\nwant substr: %s\ngot:\n%s", subStr, errStr)
|
||||
}
|
||||
if subStr := "Error: Unsupported block type"; !strings.Contains(errStr, subStr) {
|
||||
@ -2731,7 +2731,7 @@ func TestInit_invalidSyntaxBackendAttribute(t *testing.T) {
|
||||
}
|
||||
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if subStr := "OpenTofu encountered problems during initialisation, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
if subStr := "OpenTofu encountered problems during initialization, including problems\nwith the configuration, described below."; !strings.Contains(errStr, subStr) {
|
||||
t.Errorf("Error output should include preamble\nwant substr: %s\ngot:\n%s", subStr, errStr)
|
||||
}
|
||||
if subStr := "Error: Invalid character"; !strings.Contains(errStr, subStr) {
|
||||
|
Loading…
Reference in New Issue
Block a user