Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 111 for mkdtemp (0.14 sec)

  1. cmd/kubeadm/app/util/config/joinconfiguration_test.go

    import (
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/lithammer/dedent"
    )
    
    func TestLoadJoinConfigurationFromFile(t *testing.T) {
    	// Create temp folder for the test case
    	tmpdir, err := os.MkdirTemp("", "")
    	if err != nil {
    		t.Fatalf("Couldn't create tmpdir: %v", err)
    	}
    	defer os.RemoveAll(tmpdir)
    
    	// cfgFiles is in cluster_test.go
    	var tests = []struct {
    		name         string
    		fileContents string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 09:17:03 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/x86/pcrelative_test.go

    RET
    `
    
    const goData = `
    package main
    
    func testASM()
    
    func main() {
    	testASM()
    }
    `
    
    func objdumpOutput(t *testing.T, mname, source string) []byte {
    	tmpdir, err := os.MkdirTemp("", mname)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpdir)
    	err = os.WriteFile(filepath.Join(tmpdir, "go.mod"), []byte(fmt.Sprintf("module %s\n", mname)), 0666)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 23:16:01 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/loong64/asm_test.go

    // branch, in order to ensure that it assembles successfully.
    func TestLargeBranch(t *testing.T) {
    	if testing.Short() {
    		t.Skip("Skipping test in short mode")
    	}
    	testenv.MustHaveGoBuild(t)
    
    	dir, err := os.MkdirTemp("", "testlargebranch")
    	if err != nil {
    		t.Fatalf("Could not create directory: %v", err)
    	}
    	defer os.RemoveAll(dir)
    
    	// Generate a very large function.
    	buf := bytes.NewBuffer(make([]byte, 0, genBufSize))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:39:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. pkg/kubelet/config/file_test.go

    	if !apiequality.Semantic.DeepEqual(expected, update) {
    		t.Fatalf("expected %#v, got %#v", expected, update)
    	}
    }
    
    func mkTempDir(prefix string) (string, error) {
    	return os.MkdirTemp(os.TempDir(), prefix)
    }
    
    func removeAll(dir string, t *testing.T) {
    	if err := os.RemoveAll(dir); err != nil {
    		t.Fatalf("unable to remove dir %s: %v", dir, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  5. prow/integ-suite-kind.sh

    if [[ -z "${SKIP_BUILD:-}" ]]; then
      HUB="${KIND_REGISTRY}"
      export HUB
    fi
    
    # Setup junit report and verbose logging
    export T="${T:-"-v -count=1"}"
    export CI="true"
    
    export ARTIFACTS="${ARTIFACTS:-$(mktemp -d)}"
    trace "init" make init
    
    if [[ -z "${SKIP_SETUP:-}" ]]; then
      export DEFAULT_CLUSTER_YAML="./prow/config/default.yaml"
      export METRICS_SERVER_CONFIG_DIR='./prow/config/metrics'
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 05:42:41 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. cmd/kubemark/app/hollow_node_test.go

    // Such test is sufficient to detect e.g. missing kubelet dependencies that are not added in
    // pkg/kubemark/hollow_kubelet.go.
    func TestHollowNode(t *testing.T) {
    	// temp dir
    	tmpDir, err := os.MkdirTemp("", "hollow-node")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpDir)
    
    	// https server
    	server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common_v1.py

        if len(argv) > 1:
          raise app.UsageError('Too many command-line arguments.')
        if FLAGS.save_model_path:
          save_model_path = FLAGS.save_model_path
        else:
          save_model_path = tempfile.mktemp(suffix='.saved_model')
    
        signature_def_map, init_op, assets_collection = create_signature()
    
        sess = tf.Session()
        sess.run(tf.initializers.global_variables())
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 20 13:19:26 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  8. hack/update-openapi-spec.sh

        fi
        unset APISERVER_PID
    
        kube::etcd::cleanup
    
        kube::log::status "Clean up complete"
    }
    
    trap cleanup EXIT SIGINT
    
    TMP_DIR=${TMP_DIR:-$(kube::realpath "$(mktemp -d -t "$(basename "$0").XXXXXX")")}
    ETCD_HOST=${ETCD_HOST:-127.0.0.1}
    ETCD_PORT=${ETCD_PORT:-2379}
    API_PORT=${API_PORT:-8050}
    API_HOST=${API_HOST:-127.0.0.1}
    API_LOGFILE=${API_LOGFILE:-${TMP_DIR}/openapi-api-server.log}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 12 17:29:14 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/mod_download_concurrent_read.txt

    //
    // run uses a different temporary module cache in each iteration so that we
    // don't need to clean the cache or synchronize closing files after each
    // iteration.
    func run() (err error) {
    	tmpDir, err := os.MkdirTemp("", "")
    	if err != nil {
    		return err
    	}
    	defer func() {
    		if rmErr := os.RemoveAll(tmpDir); err == nil && rmErr != nil {
    			err = rmErr
    		}
    	}()
    	for i := 0; i < 10; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  10. cmd/kube-scheduler/app/options/configfile_test.go

    	// is too old
    	schedulerConfigVersionTooOld = `
    apiVersion: kubescheduler.config.k8s.io/v1alpha1
    kind: KubeSchedulerConfiguration
    `
    )
    
    func TestLoadConfigFromFile(t *testing.T) {
    	tmpDir, err := os.MkdirTemp("", "scheduler-configs")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpDir)
    
    	correctConfigFile := filepath.Join(tmpDir, "correct_config.yaml")
    	if err := os.WriteFile(correctConfigFile,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 22 13:43:42 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top