Commit Graph

9 Commits

Author SHA1 Message Date
Luke Kingland e6fa020f78
fix: test and namespace isolation (#2187)
* fix: namespace logic cleanup and test isolation

- Pulls logic for defaulting to active namespace (K8S) moved UP to CLI during
  flag default calculation.
- Pushes logic of deciding between f.Namespace vs f.Deploy.Namespace down into
  implementations.
- Updates some tests which needed to have their environment cleared.
- Refactors Pipelines tests to use client API.
- Removes namespaces as a state variable all structures, instead passing as
  an argument.
- Moves FromTempDirectory to testing package for use outside cmd.

* fix spelling errors

* fix: pipelines remover always returned (empty) error

* update tekton namespace handling

* fix: remove deprecated GitLab config: max_concurrency
2024-05-17 08:25:46 +00:00
Lumír 'Frenzy' Balhar 36d7b23b66
Add Python templates for gunicorn and uwsgi + Flask (#1655)
* Add Python templates for gunicorn and uwsgi + Flask

These templates represents the most common and simple ways
how to implement FAAS in Python either directly via gunicorn
or using Flask and uwsgi.

* feat: runtime envvar definition in templates

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: use APP_MODULE not app.sh

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update docs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* test: better diffing in tests

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update tests

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: style

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-04-10 19:03:48 +00:00
Luke Kingland 59f4e6a493
fix: mock and noop inconsistency (#1409)
* fix: mock remover missing default impl

* fix: client noop describer should not error

* src: replace generic client factory with test client

* simplify docs generator client
2022-11-07 12:45:22 +00:00
Luke Kingland d0448adb82
chore: ensure all tests clear cmd args (#1388) 2022-10-28 13:30:07 +00:00
Lance Ball 5adec03c7b
chore: update all references to kn-plugin-func (#1311)
* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: fix instances_test.go

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: still some stray kn-plugin-func

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 16:31:53 +00:00
Luke Kingland c9861ec24e
chore: cmd test cleanup (#1289)
All tests which are directory-sensitive now also:
- reset viper
- use t.Cleanup
- use t.TempDir
- use a clean XDG_CONFIG_HOME
- specify explict name when creating
- moves helpers to root_test
2022-10-03 22:03:28 +00:00
Matej Vasek 56b56a5559
Testing cleanup (#1272)
* chore: replace WithEnvVar -> t.Setenv()

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: replace defer with t.Cleanup()

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: remove unused function

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: os.Hostname -> os.UserHomeDir

Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-22 13:12:12 +00:00
Adam Boczek e1e33370d3
fix: add extra request to template cmd to avoid subsequent if repo does not exist (#1206) (#1249) 2022-09-19 12:43:08 +00:00
Luke Kingland 2f8d82bec2
feat: templates list command (#1134)
* feat: templates list command

* linter placation
2022-08-10 19:37:58 +00:00