mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore(cli): warn on template push or create when no lockfile present (#8059)
This commit is contained in:
@ -6,7 +6,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -86,7 +85,10 @@ func SetupConfig(t *testing.T, client *codersdk.Client, root config.Root) {
|
||||
// new temporary testing directory.
|
||||
func CreateTemplateVersionSource(t *testing.T, responses *echo.Responses) string {
|
||||
directory := t.TempDir()
|
||||
f, err := ioutil.TempFile(directory, "*.tf")
|
||||
f, err := os.CreateTemp(directory, "*.tf")
|
||||
require.NoError(t, err)
|
||||
_ = f.Close()
|
||||
f, err = os.Create(filepath.Join(directory, ".terraform.lock.hcl"))
|
||||
require.NoError(t, err)
|
||||
_ = f.Close()
|
||||
data, err := echo.Tar(responses)
|
||||
|
Reference in New Issue
Block a user