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
|
|
|
|
2021-06-22 15:23:19 +00:00
|
|
|
"go.pinniped.dev/test/testlib"
|
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) {
|
2021-08-25 19:34:33 +00:00
|
|
|
_ = testlib.IntegrationEnv(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)
|
|
|
|
}
|