@@ -30,28 +30,28 @@ import (
3030 "github.com/stretchr/testify/suite"
3131)
3232
33- type licenseProcessorSuite struct {
33+ type docProcessorSuite struct {
3434 suite.Suite
3535 mockStore * storage.Storage
3636 processor Processor
3737 workDir string
3838}
3939
40- func (s * licenseProcessorSuite ) SetupTest () {
40+ func (s * docProcessorSuite ) SetupTest () {
4141 s .mockStore = & storage.Storage {}
42- s .processor = NewLicenseProcessor (s .mockStore , modelspec .MediaTypeModelDoc , []string {"LICENSE" })
42+ s .processor = NewDocProcessor (s .mockStore , modelspec .MediaTypeModelDoc , []string {"LICENSE" })
4343 // generate test files for prorcess.
4444 s .workDir = s .Suite .T ().TempDir ()
4545 if err := os .WriteFile (filepath .Join (s .workDir , "LICENSE" ), []byte ("" ), 0644 ); err != nil {
4646 s .Suite .T ().Fatal (err )
4747 }
4848}
4949
50- func (s * licenseProcessorSuite ) TestName () {
51- assert .Equal (s .Suite .T (), "license " , s .processor .Name ())
50+ func (s * docProcessorSuite ) TestName () {
51+ assert .Equal (s .Suite .T (), "doc " , s .processor .Name ())
5252}
5353
54- func (s * licenseProcessorSuite ) TestProcess () {
54+ func (s * docProcessorSuite ) TestProcess () {
5555 ctx := context .Background ()
5656 repo := "test-repo"
5757 s .mockStore .On ("PushBlob" , ctx , repo , mock .Anything ).Return ("sha256:1234567890abcdef" , int64 (1024 ), nil )
@@ -64,6 +64,6 @@ func (s *licenseProcessorSuite) TestProcess() {
6464 assert .Equal (s .Suite .T (), "LICENSE" , desc [0 ].Annotations [modelspec .AnnotationFilepath ])
6565}
6666
67- func TestLicenseProcessorSuite (t * testing.T ) {
68- suite .Run (t , new (licenseProcessorSuite ))
67+ func TestDocProcessorSuite (t * testing.T ) {
68+ suite .Run (t , new (docProcessorSuite ))
6969}
0 commit comments