airshipctl/cmd/config/init_test.go
Drew Walters 5d83122b17 [#6] Add config init subcommand
This change introduces logic for the config init subcommand, which
generates an airshipctl configuration file with default values. The
default values are extracted from constants and change when the source
code is updated.

Closes #6

Change-Id: I452e26bc5a924f0cdcd3153a9b124d23e2e5b1f0
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-02-17 16:22:10 -06:00

38 lines
884 B
Go

/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
import (
"testing"
"opendev.org/airship/airshipctl/testutil"
)
func TestConfigInit(t *testing.T) {
cmdTests := []*testutil.CmdTest{
{
Name: "config-init-help",
CmdLine: "-h",
Cmd: NewCmdConfigInit(nil),
},
}
for _, tt := range cmdTests {
testutil.RunTest(t, tt)
}
}