mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
cli: fix tests failing in local dev environment (#4729)
This commit is contained in:
parent
daf098886b
commit
177556f441
@ -29,7 +29,7 @@ PID=$!
|
||||
wait_for_port 8080
|
||||
|
||||
# test cli
|
||||
HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" make test
|
||||
HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" HASURA_GRAPHQL_TEST_CLI_EXT_MANIFEST_FILE_PATH="/build/_cli_ext_output/manifest-dev.yaml" make test
|
||||
kill -s INT $PID
|
||||
|
||||
# start graphql-engine with admin secret
|
||||
|
@ -77,7 +77,7 @@ type PluginInstallOptions struct {
|
||||
}
|
||||
|
||||
func (o *PluginInstallOptions) Run() error {
|
||||
plugin, err := ec.PluginsConfig.GetPlugin(o.Name, plugins.FetchOpts{
|
||||
plugin, err := o.EC.PluginsConfig.GetPlugin(o.Name, plugins.FetchOpts{
|
||||
ManifestFile: o.ManifestFile,
|
||||
Version: o.Version.Version,
|
||||
})
|
||||
|
@ -9,9 +9,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
|
||||
"github.com/briandowns/spinner"
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
integrationtest "github.com/hasura/graphql-engine/cli/integration_test"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@ -90,19 +91,6 @@ func TestCommands(t *testing.T) {
|
||||
integrationtest.TestPrepare(t, ec)
|
||||
})
|
||||
|
||||
skip(t)
|
||||
t.Run("cli-ext-plugin-install", func(t *testing.T) {
|
||||
installOpts := &commands.PluginInstallOptions{
|
||||
EC: ec,
|
||||
Name: cli.CLIExtPluginName,
|
||||
ManifestFile: "/build/_cli_ext_output/manifest-dev.yaml",
|
||||
}
|
||||
err := installOpts.Run()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to install %s plugin, got %v", cli.CLIExtPluginName, err)
|
||||
}
|
||||
})
|
||||
|
||||
skip(t)
|
||||
// This will init the project dir
|
||||
t.Run("init command", func(t *testing.T) {
|
||||
@ -115,6 +103,21 @@ func TestCommands(t *testing.T) {
|
||||
integrationtest.TestValidate(t, ec)
|
||||
})
|
||||
|
||||
skip(t)
|
||||
if cliExtManifestFilePath := os.Getenv("HASURA_GRAPHQL_TEST_CLI_EXT_MANIFEST_FILE_PATH"); cliExtManifestFilePath != "" {
|
||||
t.Run("cli-ext-plugin-install", func(t *testing.T) {
|
||||
installOpts := &commands.PluginInstallOptions{
|
||||
EC: ec,
|
||||
Name: cli.CLIExtPluginName,
|
||||
ManifestFile: cliExtManifestFilePath,
|
||||
}
|
||||
err := installOpts.Run()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to install %s plugin, got %v", cli.CLIExtPluginName, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
skip(t)
|
||||
t.Run("console command", func(t *testing.T) {
|
||||
v2.TestConsoleCmd(t, ec)
|
||||
|
Loading…
Reference in New Issue
Block a user