2020-09-16 14:19:51 +00:00
|
|
|
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-07-08 05:20:34 +00:00
|
|
|
|
2020-07-08 01:42:14 +00:00
|
|
|
package integration
|
|
|
|
|
|
|
|
import (
|
2020-07-08 23:37:06 +00:00
|
|
|
"os"
|
2020-07-08 01:42:14 +00:00
|
|
|
"os/exec"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
2020-08-07 01:44:14 +00:00
|
|
|
|
2020-08-20 17:54:15 +00:00
|
|
|
"github.com/suzerain-io/pinniped/test/library"
|
2020-07-08 01:42:14 +00:00
|
|
|
)
|
|
|
|
|
2020-08-25 01:07:34 +00:00
|
|
|
// Smoke test to see if the kubeconfig works and the cluster is reachable.
|
2020-07-08 01:42:14 +00:00
|
|
|
func TestGetNodes(t *testing.T) {
|
2020-08-07 01:44:14 +00:00
|
|
|
library.SkipUnlessIntegration(t)
|
2020-07-08 23:37:06 +00:00
|
|
|
cmd := exec.Command("kubectl", "get", "nodes")
|
|
|
|
cmd.Stdout = os.Stdout
|
|
|
|
cmd.Stderr = os.Stderr
|
|
|
|
err := cmd.Run()
|
2020-07-08 01:42:14 +00:00
|
|
|
require.NoError(t, err)
|
|
|
|
}
|