Skip to content

Commit

Permalink
test: add test cases for oras tag conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-shuliu committed Jan 10, 2025
1 parent 3d28451 commit ab8a5b4
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/integration_tests/Test/PM/Integration/OrasTag.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Class Test.PM.Integration.OrasTag Extends Test.PM.Integration.Base
{

Parameter TargetModuleName As STRING = "oras-tag";

Method TestOrasTagConversion()
{
Set tModuleDir = ..GetModuleDir(..#TargetModuleName)

Set tSC = ##class(%IPM.Main).Shell("load -verbose " _ tModuleDir)
Do $$$AssertStatusOK(tSC,"Loaded module successfully")

Set tSC = ##class(%IPM.Main).Shell("repo -delete-all")
Do $$$AssertStatusOK(tSC,"Deleted repos successfully")

Set tSC = ##class(%IPM.Main).Shell("repo -o -name oras -url http://oras:5000 -publish 1")
Do $$$AssertStatusOK(tSC,"Set up oras module successfully")

Set tSC = ##class(%IPM.Main).Shell("publish oras-tag -r oras -verbose")
Do $$$AssertStatusOK(tSC,"Published module successfully")

Set tSC = ##class(%IPM.Main).Shell("uninstall oras-tag")
Do $$$AssertStatusOK(tSC,"Uninstalled module successfully")

Set tSC = ##class(%IPM.Main).Shell("install oras-tag")
Do $$$AssertStatusOK(tSC,"Installed module from ORAS registry successfully")

Set tSC = ##class(%IPM.Main).Shell("repo -delete-all")
Do $$$AssertStatusOK(tSC,"Deleted repos successfully")

Set tSC = ##class(%IPM.Main).Shell("repo -reset-defaults")
Do $$$AssertStatusOK(tSC,"Reset repos to default successfully")
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Document name="oras-tag.ZPM">
<Module>
<Name>oras-tag</Name>
<Version>0.0.1-beta.1+build</Version>
<Packaging>module</Packaging>
<SourcesRoot>src</SourcesRoot>
<Resource Name="OrasTag.Main.CLS"/>
</Module>
</Document>
</Export>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Class OrasTag.Main
{

ClassMethod Main()
{
Write "This is OrasTag.main"
}

}

0 comments on commit ab8a5b4

Please sign in to comment.