Skip to content

Instantly share code, notes, and snippets.

@frobware
Created August 29, 2017 07:23
Show Gist options
  • Save frobware/652834d293a9ec22e3cfe553d355b46a to your computer and use it in GitHub Desktop.
Save frobware/652834d293a9ec22e3cfe553d355b46a to your computer and use it in GitHub Desktop.
func TestTeardown(t *testing.T) {
config, tearDown := StartTestServerOrDie(t)
defer tearDown()
kubeclient, err := kubernetes.NewForConfig(config)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if true {
tmpDir, err2 := ioutil.TempDir("", "openapi_cache_test")
instance := openapi.NewCachingOpenAPIClient(kubeclient, "v1.6", tmpDir)
resources, err := instance.OpenAPIData()
if err != nil {
panic("a")
}
fmt.Println(resources)
fmt.Println(config, tearDown, kubeclient, err, err2)
fmt.Println("INSTANCE", instance)
fmt.Println(config.Host)
fmt.Println(config.APIPath)
<-make(chan struct{})
}
<-make(chan struct{})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment