Skip to content

Commit

Permalink
Add WIP vendor gherking test.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilus committed Oct 22, 2021
1 parent 1714d96 commit dcb416f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 26 deletions.
50 changes: 24 additions & 26 deletions todo.org
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,43 @@
https://godoc.org/k8s.io/helm/pkg/ignore
** DONE Automate Oya testing using Oya + CircleCI
CLOSED: [2018-12-08 Sat 17:32]
* DONE Arguments to go run -- pass to task
CLOSED: [2019-01-20 Sun 17:52]
oya run build -- --flag=5
$Flags -- map
$Args -- positional arguments
* CANCELLED Install task for packages :CANCELLED:
CLOSED: [2019-01-25 Fri 10:34]
:LOGBOOK:
- State "CANCELLED" from "TODO" [2019-01-25 Fri 10:34] \\
It's enough to have "install" task by convention in packs and then oya tasks will show it.
:END:
* TODO Vendoring is only partially implemented
** TODO Simplify oya get/vendor (based on Import statements) TBD
**** Just use Import
**** oya get -- adds to packages.lock if not there
**** oya get -- adds to packages.lock if not there
**** oya records new imports using sha in packages.lock
**** oya get -u <uri> updates package sha in packages.lock and fetches it
**** oya get -u <uri> updates package sha in packages.lock and fetches it
*** Require imported project to have correct Project + remove skipping dirs under vendor from oyafile.List
*** Rest of CLI, cleanup, messages
*** Bring README up to date
* TODO Test REPL
* Require imported project to have correct Project + remove skipping dirs under vendor from oyafile.List
* Rest of CLI, cleanup, messages
* NEXT Automate Neutron deploy using Oya
** TODO On push to branch, build & upload docker with sha tag
** TODO On merge to master, build & upload docker with release tag
** TODO On push to any branch, run tests
** TODO On merge to master, deploy to cluster if deployment dir changed
* oya -T --tasks list available tasks
* TODO Secrets
* CANCELLED Install task for packages :CANCELLED:
CLOSED: [2019-01-25 Fri 10:34]
:LOGBOOK:
- State "CANCELLED" from "TODO" [2019-01-25 Fri 10:34] \\
It's enough to have "install" task by convention in packs and then oya tasks will show it.
:END:
* TODO Simplify oya get/vendor (based on Import statements) TBD
*** Just use Import
*** oya get -- adds to packages.lock if not there
*** oya get -- adds to packages.lock if not there
*** oya records new imports using sha in packages.lock
*** oya get -u <uri> updates package sha in packages.lock and fetches it
*** oya get -u <uri> updates package sha in packages.lock and fetches it
** Require imported project to have correct Project + remove skipping dirs under vendor from oyafile.List
** Rest of CLI, cleanup, messages
** Bring README up to date
* DONE Arguments to go run -- pass to task
CLOSED: [2019-01-20 Sun 17:52]
oya run build -- --flag=5
$Flags -- map
$Args -- positional arguments
* Secrets
** Oyafile.enc
* Install task for packages
* .kasia extension
* TODO Docker pack, no language autodetect, Python + Go
* .kasia plugin based on extension or way to specify templating language
* Consider dropping run
oya run init --> oya Init
~/.oya/Oyafile -- oyafile imported by all Oyafiles, contains built-in tasks(implicitly), customization point (can import, can add before/after tasks etc.)
** oya -T --tasks list available tasks
* .Values.EarlyTerminate (default: true)
Set to false to avoid terminating on first error
* Fail for incorrect changeset paths
Expand Down
48 changes: 48 additions & 0 deletions vendor.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Feature: Vendoring

Background:
Given I'm in project dir


Scenario: Ignore vendored Oyafiles
Given file ./Oyafile containing
"""
Project: project
all: echo "main"
"""
And file ./.oya/vendor/github.com/test/foo@v1.0.0/Oyafile containing
"""
all: echo "vendored"
"""
When I run "oya run all", awaiting its exit
Then the command succeeds
And the command outputs
"""
main
"""

Scenario: Import tasks from vendored packs
Given file ./Oyafile containing
"""
Project: project
Import:
foo: github.com/test/foo
"""
And file ./.oya/vendor/github.com/test/foo/Oyafile containing
"""
all: |
foo=4
if [ $$foo -ge 3 ]; then
touch OK
fi
echo "Done"
"""
When I run "oya run foo.all", awaiting its exit
Then the command succeeds
And the command outputs
"""
Done
"""
And file ./OK exists

0 comments on commit dcb416f

Please sign in to comment.