keep init wording consistent in internal/command/init.go (#855)

Signed-off-by: haojue <acewhj@gmail.com>
This commit is contained in:
HaojueWang 2023-11-13 23:03:25 +08:00 committed by GitHub
parent 6366b2dbf6
commit 084c5dfc8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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) {