airshipctl/cmd/config/config_test.go
Kostiantyn Kalynovskyi f34c900ecc Uplift cobra dependency to v0.0.6
This version is required to integrate with clusterctl.
Starting v0.0.6 cobra Execute() method returns ErrSubCommandRequired if
command is executed when its not runnable (Run or RuneE == nil), hence
all tests that invoke such commands need to be either remove or adjusted
to expect these errors

Change-Id: Ia7935c1bf83d47b3a7d3a6c03d1989d53ad57a9a
Relates-To: #187
2020-04-23 10:47:46 -05:00

39 lines
946 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_test
import (
"testing"
cmd "opendev.org/airship/airshipctl/cmd/config"
"opendev.org/airship/airshipctl/testutil"
)
func TestConfig(t *testing.T) {
cmdTests := []*testutil.CmdTest{
{
Name: "config-cmd-with-help",
CmdLine: "--help",
Cmd: cmd.NewConfigCommand(nil),
},
}
for _, tt := range cmdTests {
testutil.RunTest(t, tt)
}
}