Message ID | 50464155-68bc-4120-b233-df18a554331dn@googlegroups.com |
---|---|
State | Changes Requested |
Headers | show |
Series | Re: [swugenerator][PATCH] tests: fix after adding -certfile CMS option | expand |
On 17.11.23 12:58, Viktor Voronin wrote: > Hi Stefano, > > I see that this one is accepted but has not been applied, could you > please check this? Thanks. It seems I agreed but I hadn't applied- It should be ok now. Best regards, Stefano > > Regards, Victor > > On Wednesday, 20 September 2023 at 12:52:55 UTC+2 Victor Voronin wrote: > > Signed-off-by: Victor Voronin <viktor....@evologics.de> > --- > tests/test_main.py | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --git a/tests/test_main.py b/tests/test_main.py > index 4fd97d0..6612b2f 100644 > --- a/tests/test_main.py > +++ b/tests/test_main.py > @@ -88,8 +88,10 @@ def test_missing_config_file_throws_exception(): > > #### Signing option parsing tests #### > SIGNING_TEST_PARAMETERS = [ > - ("CMS,foo,bar,baz", SWUSignCMS("foo", "bar", "baz")), > - ("CMS,foo,bar", SWUSignCMS("foo", "bar", None)), > + ("CMS,foo,bar,baz,qux", SWUSignCMS("foo", "bar", "baz", "qux")), > + ("CMS,foo,bar,,qux", SWUSignCMS("foo", "bar", "", "qux")), > + ("CMS,foo,bar,baz", SWUSignCMS("foo", "bar", "baz", None)), > + ("CMS,foo,bar", SWUSignCMS("foo", "bar", None, None)), > ("RSA,foo,bar", SWUSignRSA("foo", "bar")), > ("RSA,foo", SWUSignRSA("foo", None)), > ("PKCS11,foo", SWUSignPKCS11("foo")), > @@ -108,19 +110,20 @@ def > test_valid_siging_params_parsed_to_correct_signing_obj(arg, expected): > > > INVALID_SIGNING_TEST_PARAMETERS = [ > - ("CMS", "CMS requires private key, certificate, and an optional > password file"), > - ("CMS,", "CMS requires private key, certificate, and an optional > password file"), > - ("CMS,,", "CMS requires private key, certificate, and an optional > password file"), > - ("CMS,,,", "CMS requires private key, certificate, and an optional > password file"), > - ("CMS,,,,", "CMS requires private key, certificate, and an > optional password file"), > + ("CMS", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > + ("CMS,", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > + ("CMS,,", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > + ("CMS,,,", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > + ("CMS,,,,", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > + ("CMS,,,,,", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > ( > "CMS,,foo,", > - "CMS requires private key, certificate, and an optional password > file", > + "CMS requires private key, certificate, an optional password file > and an optional file with additional certificates", > ), > - ("CMS,foo", "CMS requires private key, certificate, and an > optional password file"), > + ("CMS,foo", "CMS requires private key, certificate, an optional > password file and an optional file with additional certificates"), > ( > - "CMS,foo,bar,baz,jaz", > - "CMS requires private key, certificate, and an optional password > file", > + "CMS,foo,bar,baz,qux,jaz", > + "CMS requires private key, certificate, an optional password file > and an optional file with additional certificates", > ), > ("RSA,foo,bar,baz", "RSA requires private key and an optional > password file"), > ("PKCS11", "PKCS11 requires URI"), > @@ -153,7 +156,7 @@ def mock_main_funcs(monkeypatch): > return "foo", "bar" > > def mock_parse_signing_option(*_): > - return SWUSignCMS("foo", "bar", "baz") > + return SWUSignCMS("foo", "bar", "baz", "qux") > > def mock_parse_config_file(*_): > return {} > -- > 2.25.1 > > -- > You received this message because you are subscribed to the Google > Groups "swupdate" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to swupdate+unsubscribe@googlegroups.com > <mailto:swupdate+unsubscribe@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/swupdate/50464155-68bc-4120-b233-df18a554331dn%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/50464155-68bc-4120-b233-df18a554331dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
diff --git a/tests/test_main.py b/tests/test_main.py index 4fd97d0..6612b2f 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -88,8 +88,10 @@ def test_missing_config_file_throws_exception(): #### Signing option parsing tests #### SIGNING_TEST_PARAMETERS = [ - ("CMS,foo,bar,baz", SWUSignCMS("foo", "bar", "baz")), - ("CMS,foo,bar", SWUSignCMS("foo", "bar", None)), + ("CMS,foo,bar,baz,qux", SWUSignCMS("foo", "bar", "baz", "qux")), + ("CMS,foo,bar,,qux", SWUSignCMS("foo", "bar", "", "qux")), + ("CMS,foo,bar,baz", SWUSignCMS("foo", "bar", "baz", None)), + ("CMS,foo,bar", SWUSignCMS("foo", "bar", None, None)), ("RSA,foo,bar", SWUSignRSA("foo", "bar")), ("RSA,foo", SWUSignRSA("foo", None)), ("PKCS11,foo", SWUSignPKCS11("foo")), @@ -108,19 +110,20 @@ def test_valid_siging_params_parsed_to_correct_signing_obj(arg, expected): INVALID_SIGNING_TEST_PARAMETERS = [ - ("CMS", "CMS requires private key, certificate, and an optional password file"), - ("CMS,", "CMS requires private key, certificate, and an optional password file"), - ("CMS,,", "CMS requires private key, certificate, and an optional password file"), - ("CMS,,,", "CMS requires private key, certificate, and an optional password file"), - ("CMS,,,,", "CMS requires private key, certificate, and an optional password file"), + ("CMS", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), + ("CMS,", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), + ("CMS,,", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), + ("CMS,,,", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), + ("CMS,,,,", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), + ("CMS,,,,,", "CMS requires private key, certificate, an optional password
Hi Stefano, I see that this one is accepted but has not been applied, could you please check this? Thanks. Regards, Victor On Wednesday, 20 September 2023 at 12:52:55 UTC+2 Victor Voronin wrote: Signed-off-by: Victor Voronin <viktor....@evologics.de> --- tests/test_main.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) file and an optional file with additional certificates"), ( "CMS,,foo,", - "CMS requires private key, certificate, and an optional password file", + "CMS requires private key, certificate, an optional password file and an optional file with additional certificates", ), - ("CMS,foo", "CMS requires private key, certificate, and an optional password file"), + ("CMS,foo", "CMS requires private key, certificate, an optional password file and an optional file with additional certificates"), ( - "CMS,foo,bar,baz,jaz", - "CMS requires private key, certificate, and an optional password file", + "CMS,foo,bar,baz,qux,jaz", + "CMS requires private key, certificate, an optional password file and an optional file with additional certificates", ), ("RSA,foo,bar,baz", "RSA requires private key and an optional password file"), ("PKCS11", "PKCS11 requires URI"), @@ -153,7 +156,7 @@ def mock_main_funcs(monkeypatch): return "foo", "bar" def mock_parse_signing_option(*_): - return SWUSignCMS("foo", "bar", "baz") + return SWUSignCMS("foo", "bar", "baz", "qux") def mock_parse_config_file(*_): return {}