8 Commits

Author SHA1 Message Date
Dominik Schulz
936f0db2a5
Add more test coverage (#3073)
* [chore] Add more test coverage

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix assert.Len invocation

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-03-02 19:49:22 +01:00
Yolan Romailler
d56639fcd7
[CLEANUP] Migration of options to more appropriate sections (#2681)
* [CLEANUP] Moving options to the correct config section

This adds an easy migration path to our config handling, which should
allow us to migrate option names around much more easily in the future.

Any system level config or env variables options are not migrated.

This also fixes a bug in our test code, where the root mount path was
not properly set in our config, because we used "path:" instead of
"path=" to set it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Document legacy options and their migration path

This also makes sure that legacy options aren't used in the code anymore using the docs test and its regexp

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Removing weird spaces from changelog

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Reformatting our Markdown tables properly

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [TESTING] Patching a timezone bug in tests

This is a fun one where if your Timezone isn't UTC and you are past midnight but it's not past midnight UTC, the tests would fail because you're not using the right date to validate it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Fix a typo and use the correct Env variables in the doc about the custom Env variables

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BREAKING] Custom Env options moved from GOPASS_CONFIG_CONFIG_KEY_i to GOPASS_CONFIG_KEY_i

As discussed in #2617, this actually reflects the way GIT_CONFIG works.

It also fixes a potential Panic in our codebase when IsSet was called
without any Preset config on a non-existing key.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Patching all of the new linter complaints

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Use Go1.21 everywhere

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Increase our Golangci timeout

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] code review comment and extra regression test

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-03 18:40:58 +01:00
Faye Duxovni
dcf25c51e6
Include shadowed entries in flat list output (#2376)
* Include shadowed entries in flat list output

Signed-off-by: Faye Duxovni <duxovni@duxovni.org>

* Test fixes

Signed-off-by: Faye Duxovni <duxovni@duxovni.org>

Signed-off-by: Faye Duxovni <duxovni@duxovni.org>
2022-10-03 07:44:31 +02:00
Dominik Schulz
00d04c40c6
Do not omit shadowed entries in ls output (#2341)
* Do not omit shadowed entries in ls output

Fixes #2338

RELEASE_NOTES=[BUGFIX] Do not shadow entries behind folders.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add shadow marker

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Adjust tests to match the new shadow behaviour

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Update list docs wrt. shadowing

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Do not mark mounts as shadowed. That's already implicit.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add more comments and some other cleanup

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-09-16 19:42:02 +02:00
Dominik Schulz
16c071a780
Enable golangci-lint on push and pr (#2158)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-24 21:58:53 +01:00
Yolan Romailler
ef72769301
Refactoring List (#1559)
Fixes #1558

RELEASE_NOTES=[BUGFIX] Apply limit in list correctly
RELEASE_NOTES=[ENHANCEMENT] Adding a trailing separator to the listed folders

This is also including a refactoring of the action/list.go in
order to avoid code duplication.

It is important to notice that now one must set MaxDepth to -1 in order
to list all the items in a subtree instead of 0. The 0 is now only
listing the direct parents of the subtree, 1 is listing the subitems,
and so on as explained in docs/commands/list.md

Signed-off-by: Yolan Romailler <yolan@romailler.ch>
2020-08-27 12:28:27 +02:00
Dominik Schulz
5f4f645e18
Fix some regressions (#1463)
Fixes #1460
Fixes #1462

This commit fixes broken shadowing in the new tree implementation
as well as removing the broken init flag to mounts add.

RELEASE_NOTES=[BUGFIX] Fix tree shadowing.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-07-20 23:00:25 +02:00
Dominik Schulz
668dd0a486
Rewrite tree implementation (#1395)
This commit slightly rewrites the tree implementation and removes
another unnecessary indirection.

RELEASE_NOTES=[ENHANCEMENT] Rewrite tree implementation.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-05-29 21:59:35 +02:00