github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/acceptance/test_data/source_files/config_tests/workspace_tests.json (about)

     1  [
     2    {
     3      "test": "default workspace profile location env variable set",
     4      "description": "",
     5      "cmd": "query",
     6      "setup": {
     7        "env": [
     8          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles"
     9        ],
    10        "args": []
    11      },
    12      "expected": {
    13        "introspection": "info",
    14        "pipes-host": "latestpipe.turbot.io/",
    15        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099999",
    16        "install-dir": "sp_install_dir_default",
    17        "mod-location": "sp_install_dir_default",
    18        "snapshot-location": "snaps",
    19        "workspace": "default",
    20        "workspace-database": "fk43e7"
    21      }
    22    },
    23    {
    24      "test": "default workspace profile location env variable set, all env variables set and all command line arguments set",
    25      "description": "",
    26      "cmd": "query",
    27      "setup": {
    28        "env": [
    29          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles",
    30          "PIPES_HOST=testpipe.turbot.io",
    31          "STEAMPIPE_MOD_LOCATION=sp_install_dir_env",
    32          "STEAMPIPE_INSTALL_DIR=sp_install_dir_env",
    33          "PIPES_TOKEN=spt_012faketoken34567890_012faketoken3456789099996",
    34          "STEAMPIPE_SNAPSHOT_LOCATION=snapshot",
    35          "STEAMPIPE_WORKSPACE_DATABASE=fk/43e7",
    36          "STEAMPIPE_INTROSPECTION=none"
    37        ],
    38        "args": [
    39          "--install-dir=sp_install_dir_default",
    40          "--mod-location=sp_install_dir_default",
    41          "--pipes-host=fastestpipe.turbot.io",
    42          "--pipes-token=spt_012faketoken34567890_012faketoken3456789099990",
    43          "--snapshot-location=snaps",
    44          "--workspace-database=fk43e9"
    45        ]
    46      },
    47      "expected": {
    48        "introspection": "none",
    49        "pipes-host": "fastestpipe.turbot.io",
    50        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099990",
    51        "install-dir": "sp_install_dir_default",
    52        "mod-location": "sp_install_dir_default",
    53        "snapshot-location": "snaps",
    54        "workspace": "default",
    55        "workspace-database": "fk43e9"
    56      }
    57    },
    58    {
    59      "test": "env variables set",
    60      "description": "",
    61      "cmd": "query",
    62      "setup": {
    63        "env": [
    64          "PIPES_HOST=latestpipe.turbot.io/",
    65          "STEAMPIPE_INSTALL_DIR=sp_install_dir_env",
    66          "STEAMPIPE_MOD_LOCATION=sp_install_dir_env",
    67          "PIPES_TOKEN=spt_012faketoken34567890_012faketoken3456789099999",
    68          "STEAMPIPE_SNAPSHOT_LOCATION=snaps",
    69          "STEAMPIPE_WORKSPACE_DATABASE=fk43e7"
    70        ],
    71        "args": []
    72      },
    73      "expected": {
    74        "pipes-host": "latestpipe.turbot.io/",
    75        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099999",
    76        "install-dir": "sp_install_dir_env",
    77        "mod-location": "sp_install_dir_env",
    78        "snapshot-location": "snaps",
    79        "workspace": "default",
    80        "workspace-database": "fk43e7"
    81      }
    82    },
    83    {
    84      "test": "default workspace profile location env variable set and --workspace arg passed",
    85      "description": "",
    86      "cmd": "query",
    87      "setup": {
    88        "env": [
    89          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles"
    90        ],
    91        "args": [
    92          "--workspace=sample"
    93        ]
    94      },
    95      "expected": {
    96        "introspection": "control",
    97        "pipes-host": "testpipe.turbot.io",
    98        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099999",
    99        "install-dir": "sp_install_dir_sample",
   100        "mod-location": "sp_install_dir_sample",
   101        "snapshot-location": "snap",
   102        "workspace": "sample",
   103        "workspace-database": "fk43e8"
   104      }
   105    },
   106    {
   107      "test": "all command line arguments set",
   108      "description": "",
   109      "cmd": "query",
   110      "setup": {
   111        "env": [],
   112        "args": [
   113          "--install-dir=sp_install_dir_sample",
   114          "--mod-location=sp_install_dir_sample",
   115          "--pipes-host=fastestpipe.turbot.io",
   116          "--pipes-token=spt_012faketoken34567890_012faketoken3456789099990",
   117          "--snapshot-location=snaps",
   118          "--workspace-database=fk43e9"
   119        ]
   120      },
   121      "expected": {
   122        "pipes-host": "fastestpipe.turbot.io",
   123        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099990",
   124        "install-dir": "sp_install_dir_sample",
   125        "mod-location": "sp_install_dir_sample",
   126        "snapshot-location": "snaps",
   127        "workspace": "default",
   128        "workspace-database": "fk43e9"
   129      }
   130    },
   131    {
   132      "test": "default workspace profile location env variable set and all env variables set",
   133      "description": "",
   134      "cmd": "query",
   135      "setup": {
   136        "env": [
   137          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles",
   138          "PIPES_HOST=fastestpipe.turbot.io/",
   139          "STEAMPIPE_INSTALL_DIR=sp_install_dir_env",
   140          "STEAMPIPE_MOD_LOCATION=sp_install_dir_env",
   141          "PIPES_TOKEN=spt_012faketoken34567890_012faketoken3456789099996",
   142          "STEAMPIPE_SNAPSHOT_LOCATION=snapshot",
   143          "STEAMPIPE_WORKSPACE_DATABASE=ab43e6"
   144        ],
   145        "args": []
   146      },
   147      "expected": {
   148        "pipes-host": "fastestpipe.turbot.io/",
   149        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099996",
   150        "install-dir": "sp_install_dir_env",
   151        "mod-location": "sp_install_dir_env",
   152        "snapshot-location": "snapshot",
   153        "workspace": "default",
   154        "workspace-database": "ab43e6"
   155      }
   156    },
   157    {
   158      "test": "default workspace profile location env variable set, all env variables set and --workspace arg passed",
   159      "description": "",
   160      "cmd": "query",
   161      "setup": {
   162        "env": [
   163          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles",
   164          "PIPES_HOST=fastestpipe.turbot.io/",
   165          "STEAMPIPE_INSTALL_DIR=sp_install_dir_env",
   166          "STEAMPIPE_MOD_LOCATION=sp_install_dir_env",
   167          "PIPES_TOKEN=spt_012faketoken34567890_012faketoken3456789099996",
   168          "STEAMPIPE_SNAPSHOT_LOCATION=snapshot",
   169          "STEAMPIPE_WORKSPACE_DATABASE=ab43e6"
   170        ],
   171        "args": [
   172          "--workspace=sample"
   173        ]
   174      },
   175      "expected": {
   176        "pipes-host": "testpipe.turbot.io",
   177        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099999",
   178        "install-dir": "sp_install_dir_sample",
   179        "mod-location": "sp_install_dir_sample",
   180        "snapshot-location": "snap",
   181        "workspace": "sample",
   182        "workspace-database": "fk43e8"
   183      }
   184    },
   185    {
   186      "test": "all env variables set and --workspace arg passed",
   187      "description": "",
   188      "cmd": "query",
   189      "setup": {
   190        "env": [
   191          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles",
   192          "PIPES_HOST=fastestpipe.turbot.io/",
   193          "STEAMPIPE_INSTALL_DIR=sp_install_dir_env",
   194          "STEAMPIPE_MOD_LOCATION=sp_install_dir_env",
   195          "PIPES_TOKEN=spt_012faketoken34567890_012faketoken3456789099996",
   196          "STEAMPIPE_SNAPSHOT_LOCATION=snapshot",
   197          "STEAMPIPE_WORKSPACE_DATABASE=ab43e6"
   198        ],
   199        "args": [
   200          "--workspace=sample"
   201        ]
   202      },
   203      "expected": {
   204        "pipes-host": "testpipe.turbot.io",
   205        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099999",
   206        "install-dir": "sp_install_dir_sample",
   207        "mod-location": "sp_install_dir_sample",
   208        "snapshot-location": "snap",
   209        "workspace": "sample",
   210        "workspace-database": "fk43e8"
   211      }
   212    },
   213    {
   214      "test": "default workspace profile location env variable set and all command line arguments set",
   215      "description": "",
   216      "cmd": "query",
   217      "setup": {
   218        "env": [
   219          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles"
   220        ],
   221        "args": [
   222          "--install-dir=sp_install_dir_default",
   223          "--mod-location=sp_install_dir_default",
   224          "--pipes-host=fastestpipe.turbot.io",
   225          "--pipes-token=spt_012faketoken34567890_012faketoken3456789099990",
   226          "--snapshot-location=snaps",
   227          "--workspace-database=fk43e9"
   228        ]
   229      },
   230      "expected": {
   231        "pipes-host": "fastestpipe.turbot.io",
   232        "pipes-token": "spt_012faketoken34567890_012faketoken3456789099990",
   233        "install-dir": "sp_install_dir_default",
   234        "mod-location": "sp_install_dir_default",
   235        "snapshot-location": "snaps",
   236        "workspace": "default",
   237        "workspace-database": "fk43e9"
   238      }
   239    },
   240    {
   241      "test": "options set in default workspace profile(2)",
   242      "description": "",
   243      "cmd": "query",
   244      "setup": {
   245        "env": [
   246          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options"
   247        ],
   248        "args": []
   249      },
   250      "expected": {
   251        "query.autocomplete": false,
   252        "query.header": false,
   253        "query.multi": true,
   254        "query.output": "json",
   255        "query-timeout": 0,
   256        "search-path": "[ ]",
   257        "search-path-prefix": "[ abc ]",
   258        "query.separator": "|",
   259        "query.timing": true,
   260        "telemetry": "info",
   261        "update-check": "false",
   262        "watch": false
   263      }
   264    },
   265    {
   266      "test": "default workspace location set and env variables set(3)",
   267      "description": "",
   268      "cmd": "query",
   269      "setup": {
   270        "env": [
   271          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options",
   272          "STEAMPIPE_MAX_PARALLEL=10",
   273          "STEAMPIPE_QUERY_TIMEOUT=100",
   274          "STEAMPIPE_TELEMETRY=none",
   275          "STEAMPIPE_UPDATE_CHECK=true"
   276        ],
   277        "args": []
   278      },
   279      "expected": {
   280        "max-parallel": 10,
   281        "query-timeout": 100,
   282        "telemetry": "none",
   283        "update-check": true
   284      }
   285    },
   286    {
   287      "test": "default workspace location set and --workspace arg passed(4)",
   288      "description": "",
   289      "cmd": "query",
   290      "setup": {
   291        "env": [
   292          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options"
   293        ],
   294        "args": [
   295          "--workspace=sample"
   296        ]
   297      },
   298      "expected": {
   299        "query.autocomplete": true,
   300        "query.header": false,
   301        "query.multi": true,
   302        "query.output": "csv",
   303        "search-path": "[ abc ]",
   304        "search-path-prefix": "[ abc, def ]",
   305        "query.separator": ";",
   306        "query.timing": true,
   307        "telemetry": "none",
   308        "update-check": "true",
   309        "watch": false
   310      }
   311    },
   312    {
   313      "test": "all command line args passed(5)",
   314      "description": "",
   315      "cmd": "query",
   316      "setup": {
   317        "env": [],
   318        "args": [
   319          "--header=true",
   320          "--output=table",
   321          "--query-timeout=190",
   322          "--search-path=abc",
   323          "--search-path-prefix=def",
   324          "--separator=+",
   325          "--timing=true", 
   326          "--watch=true"
   327        ]
   328      },
   329      "expected": {
   330        "query.autocomplete": false,
   331        "header": true,
   332        "output": "table",
   333        "query-timeout": 190,
   334        "search-path": "[ abc ]",
   335        "search-path-prefix": "[ def ]",
   336        "separator": "+",
   337        "telemetry": "none",
   338        "update-check": "true",
   339        "watch": true
   340      }
   341    },
   342    {
   343      "test": "options set in default workspace profile and env variables passed(6)",
   344      "description": "",
   345      "cmd": "query",
   346      "setup": {
   347        "env": [
   348          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options",
   349          "STEAMPIPE_MAX_PARALLEL=10",
   350          "STEAMPIPE_QUERY_TIMEOUT=100",
   351          "STEAMPIPE_TELEMETRY=none",
   352          "STEAMPIPE_UPDATE_CHECK=true"
   353        ],
   354        "args": []
   355      },
   356      "expected": {
   357        "query.autocomplete": false,
   358        "query.header": false,
   359        "max-parallel": 10,
   360        "query.multi": true,
   361        "query.output": "json",
   362        "query-timeout": 100,
   363        "search-path": "[ ]",
   364        "search-path-prefix": "[ abc ]",
   365        "query.separator": "|",
   366        "telemetry": "none",
   367        "update-check": true,
   368        "watch": false
   369      }
   370    },
   371    {
   372      "test": "options set in default workspace profile, env variables passed and --workspace arg passed(7)",
   373      "description": "",
   374      "cmd": "query",
   375      "setup": {
   376        "env": [
   377          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options",
   378          "STEAMPIPE_MAX_PARALLEL=10",
   379          "STEAMPIPE_QUERY_TIMEOUT=100",
   380          "STEAMPIPE_TELEMETRY=none",
   381          "STEAMPIPE_UPDATE_CHECK=true"
   382        ],
   383        "args": [
   384          "--workspace=sample"
   385        ]
   386      },
   387      "expected": {
   388        "autocomplete": true,
   389        "header": false,
   390        "max-parallel": 10,
   391        "multi": true,
   392        "output": "csv",
   393        "query-timeout": 100,
   394        "search-path": "[ abc ]",
   395        "search-path-prefix": "[ abc, def ]",
   396        "separator": ";",
   397        "telemetry": "none",
   398        "update-check": true,
   399        "watch": false
   400      }
   401    },
   402    {
   403      "test": "options set in default workspace profile, env variables passed and STEAMPIPE_WORKSPACE env passed(8)",
   404      "description": "",
   405      "cmd": "query",
   406      "setup": {
   407        "env": [
   408          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options",
   409          "STEAMPIPE_WORKSPACE=sample",
   410          "STEAMPIPE_MAX_PARALLEL=10",
   411          "STEAMPIPE_QUERY_TIMEOUT=100",
   412          "STEAMPIPE_TELEMETRY=none",
   413          "STEAMPIPE_UPDATE_CHECK=true"
   414        ],
   415        "args": []
   416      },
   417      "expected": {
   418        "autocomplete": true,
   419        "header": false,
   420        "max-parallel": 10,
   421        "multi": true,
   422        "output": "csv",
   423        "query-timeout": 100,
   424        "search-path": "[ abc ]",
   425        "search-path-prefix": "[ abc, def ]",
   426        "separator": ";",
   427        "telemetry": "none",
   428        "update-check": true,
   429        "watch": false
   430      }
   431    },
   432    {
   433      "test": "options set in default workspace profile, env variables passed, --workspace arg passed and all command line args passed(8)",
   434      "description": "",
   435      "cmd": "query",
   436      "setup": {
   437        "env": [
   438          "STEAMPIPE_WORKSPACE_PROFILES_LOCATION=workspace_profiles_options",
   439          "STEAMPIPE_MAX_PARALLEL=10",
   440          "STEAMPIPE_QUERY_TIMEOUT=100",
   441          "STEAMPIPE_TELEMETRY=none",
   442          "STEAMPIPE_UPDATE_CHECK=true"
   443        ],
   444        "args": [
   445          "--workspace=sample",
   446          "--header=true",
   447          "--output=table",
   448          "--query-timeout=190",
   449          "--search-path=xyz",
   450          "--search-path-prefix=pqr",
   451          "--separator=+",
   452          "--timing=true", 
   453          "--watch=true"
   454        ]
   455      },
   456      "expected": {
   457        "autocomplete": true,
   458        "header": true,
   459        "max-parallel": 10,
   460        "multi": true,
   461        "output": "table",
   462        "query-timeout": 190,
   463        "search-path": "[ xyz ]",
   464        "search-path-prefix": "[ pqr ]",
   465        "separator": "+",
   466        "telemetry": "none",
   467        "update-check": true,
   468        "watch": true
   469      }
   470    },
   471    {
   472      "test": "config/default.spc, env variables passed all command line args passed(8)",
   473      "description": "",
   474      "cmd": "query",
   475      "setup": {
   476        "env": [
   477          "STEAMPIPE_MAX_PARALLEL=10",
   478          "STEAMPIPE_QUERY_TIMEOUT=100",
   479          "STEAMPIPE_TELEMETRY=none",
   480          "STEAMPIPE_UPDATE_CHECK=true"
   481        ],
   482        "args": [
   483          "--workspace=sample",
   484          "--header=true",
   485          "--output=table",
   486          "--query-timeout=190",
   487          "--search-path=xyz",
   488          "--search-path-prefix=pqr",
   489          "--separator=+",
   490          "--timing=true", 
   491          "--watch=true"
   492        ]
   493      },
   494      "expected": {
   495        "autocomplete": true,
   496        "header": true,
   497        "max-parallel": 10,
   498        "multi": true,
   499        "output": "table",
   500        "query-timeout": 190,
   501        "search-path": "[ xyz ]",
   502        "search-path-prefix": "[ pqr ]",
   503        "separator": "+",
   504        "telemetry": "none",
   505        "update-check": true,
   506        "watch": true
   507      }
   508    },
   509    {
   510      "test": "config/default.spc, env variables",
   511      "description": "",
   512      "cmd": "query",
   513      "setup": {
   514        "env": [
   515          "STEAMPIPE_MAX_PARALLEL=10",
   516          "STEAMPIPE_QUERY_TIMEOUT=100",
   517          "STEAMPIPE_TELEMETRY=none",
   518          "STEAMPIPE_UPDATE_CHECK=true"
   519        ],
   520        "args": []
   521      },
   522      "expected": {
   523        "autocomplete": true,
   524        "header": false,
   525        "max-parallel": 10,
   526        "multi": true,
   527        "output": "csv",
   528        "query-timeout": 100,
   529        "search-path": "[ abc ]",
   530        "search-path-prefix": "[ abc, def ]",
   531        "separator": ";",
   532        "telemetry": "none",
   533        "update-check": true,
   534        "watch": false
   535      }
   536    }
   537  ]