-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aunit run for packages does not work on 740 #18
Comments
Oh, this is going to be tough. Do you mind sharing content of Could you try changing: |
Sure, I'll send it to you.
I was looking for that line but my non-existent python knowledge held me back... I also deleted the options block diff --git a/sap/adt/aunit.py b/sap/adt/aunit.py
index 460eeb5..1bc3cd3 100644
--- a/sap/adt/aunit.py
+++ b/sap/adt/aunit.py
@@ -38,12 +38,6 @@ class AUnit:
<external>
<coverage active="false"/>
</external>
- <options>
- <uriType value="semantic"/>
- <testDeterminationStrategy sameProgram="true" assignedTests="false" appendAssignedTestsPreview="true"/>
- <testRiskLevels harmless="true" dangerous="true" critical="true"/>
- <testDurations short="true" medium="true" long="true"/>
- </options>
<adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
<objectSet kind="inclusive">
<adtcore:objectReferences> That didn't change the result either. The requests now look identical to me, except for the upper / lower case of the package name.
<?xml version="1.0" encoding="UTF-8"?>
<aunit:runConfiguration xmlns:aunit="http://www.sap.com/adt/aunit">
<external>
<coverage active="false"/>
</external>
<adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
<objectSet kind="inclusive">
<adtcore:objectReferences>
<adtcore:objectReference adtcore:uri="/sap/bc/adt/vit/wb/object_type/devck/object_name/%2Fabc%2Fpackage"/>
</adtcore:objectReferences>
</objectSet>
</adtcore:objectSets>
</aunit:runConfiguration> ADT <?xml version="1.0" encoding="UTF-8"?>
<aunit:runConfiguration xmlns:aunit="http://www.sap.com/adt/aunit">
<external>
<coverage active="false"/>
</external>
<adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
<objectSet kind="inclusive">
<adtcore:objectReferences>
<adtcore:objectReference adtcore:uri="/sap/bc/adt/vit/wb/object_type/devck/object_name/%2abc%2Fpackage"/>
</adtcore:objectReferences>
</objectSet>
</adtcore:objectSets>
</aunit:runConfiguration> ....even later.... OK, this fixes it, apparently 740SP20 is case sensitive in regards to the package name. The other patch regarding the uri is also needed, deleting the options block is not required. diff --git a/sap/adt/objects.py b/sap/adt/objects.py
index 1559494..922b6ff 100644
--- a/sap/adt/objects.py
+++ b/sap/adt/objects.py
@@ -413,7 +413,7 @@ class ADTObject(metaclass=OrderedClassMembers):
"""ADT object URL fragment"""
# pylint: disable=no-member
- return self.objtype.basepath + '/' + quote_plus(self.name.lower())
+ return self.objtype.basepath + '/' + quote_plus(self.name)
@property
diff --git a/sap/adt/package.py b/sap/adt/package.py
index 7160d21..548348f 100644
--- a/sap/adt/package.py
+++ b/sap/adt/package.py
@@ -36,7 +36,7 @@ class Package(ADTObject):
OBJTYPE = ADTObjectType(
'DEVC/K',
- 'packages',
+ 'vit/wb/object_type/devck/object_name',
xmlns_adtcore_ancestor('pak', 'http://www.sap.com/adt/packages'),
'application/vnd.sap.adt.packages.v1+xml',
{}, |
Well done! Thank you very much. |
Do you mind if I open issues where the cause might be a 740 SP20 backend?
Request using ADT:
Request using sapcli
./sapcli aunit run package "/ABC/PACKAGE"
:Result:
It seems like my backend version requires the
/sap/bc/adt/vit/wb/object_type/{type}/object_name/{name}
-syntax to be used for packages?Directly testing classes works fine
./sapcli aunit run class "/ABC/MY_CLASS"
.The text was updated successfully, but these errors were encountered: