Skip to content

Conversation

@pjbgf
Copy link
Member

@pjbgf pjbgf commented May 25, 2022

The tests cover the key support for HTTP, HTTPS and NO_PROXY.
The tests only focuses on managed transport, as unmanaged transport is sunsetting.

Note that unmanaged transport does not support HTTP_PROXY.

depends on #727.

aryan9600 and others added 9 commits May 24, 2022 22:06
Injects transport and auth options at the transport level directly to
bypass the inbuilt credentials callback because of it's several
shortcomings. Moves some of the pre-existing logic from the reconciler
to the checkout implementation.

Signed-off-by: Sanskar Jaiswal <[email protected]>
Signed-off-by: Sanskar Jaiswal <[email protected]>
In TestHelmRepositoryReconciler_ReconcileTypeUpdatePredicateFilter, when
the type of HelmRepo is updated and immediately checked for the object
to be ready, if the check happens before the client cache is updated, it
results in observing the object to be ready in the previous generation.
This results in status check failure:

```
[Check-FAIL]: [Ready condition must be False when the ObservedGeneration is less than the object Generation, Ready condition must be False when any of the status condition's ObservedGeneration is less than the object Generation: [Ready ArtifactInStorage]]
```

Explicitly look for the object with the next generation to prevent such
failure.

Signed-off-by: Sunny <[email protected]>
The observed generation must be set only when actual observation is
made. When an actual observation is made, some conditions are set on the
object. Introduce a helper function
addPatchOptionWithStatusObservedGeneration() to set the patcher option
WithStatusObservedGeneration only when there's any condition in the
status.

Updates the existing tests that depended on this behavior.

This fixes the issue where the observed generation is set by the patcher
when a reconciler does an early return for setting the finalizers only.
With this, the observed generation will be updated only when some
observations are made on the object based on the usual rules of success
result, no error, ignore error and stalled condition.

Signed-off-by: Sunny <[email protected]>
Some test cases rely on checksum to match in order to pass.
Those checksums were calculated based on file headers which
contain their file modes.

In Ubuntu, the umask is set to 002 by default, resulting in
the tests files having different permissions then when the
same files are cloned on another Linux machine with umask
set to 022.

This change ensures that the files are always set (to 0644 and
the directories to 0755) before running the aforementioned tests.

Signed-off-by: Paulo Gomes <[email protected]>
Users environmental proxy settings should not impact
the execution of the tests. The changes override both
HTTP_PROXY and HTTPS_PROXY to ensure that is the case.

Signed-off-by: Paulo Gomes <[email protected]>
The tests cover the key support for HTTP, HTTPS and NO_PROXY.
The tests only focuses on managed transport, as unmanaged
transport is sunsetting.

Note that unmanaged transport does not support HTTP_PROXY.

Signed-off-by: Paulo Gomes <[email protected]>
@pjbgf pjbgf added the area/ci CI related issues and pull requests label May 25, 2022
@pjbgf pjbgf added this to the GA milestone May 25, 2022
@pjbgf
Copy link
Member Author

pjbgf commented May 26, 2022

Closing in favour of the dependent PR.

@pjbgf pjbgf closed this May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants