MCPcopy Index your code
hub / github.com/aptly-dev/aptly / TestString

Method TestString

deb/publish_test.go:577–598  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

575}
576
577func (s *PublishedRepoSuite) TestString(c *C) {
578 c.Check(s.repo.String(), Equals,
579 "ppa/squeeze [] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
580 c.Check(s.repo2.String(), Equals,
581 "ppa/maverick [] publishes {main: [local1]: comment1}")
582 repo, _ := NewPublishedRepo("", "", "squeeze", []string{"s390"}, []string{"main"}, []interface{}{s.snapshot}, s.factory, false)
583 c.Check(repo.String(), Equals,
584 "./squeeze [s390] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
585 repo, _ = NewPublishedRepo("", "", "squeeze", []string{"i386", "amd64"}, []string{"main"}, []interface{}{s.snapshot}, s.factory, false)
586 c.Check(repo.String(), Equals,
587 "./squeeze [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
588 repo.Origin = "myorigin"
589 c.Check(repo.String(), Equals,
590 "./squeeze (origin: myorigin) [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
591 repo.Label = "mylabel"
592 c.Check(repo.String(), Equals,
593 "./squeeze (origin: myorigin, label: mylabel) [i386, amd64] publishes {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
594 c.Check(s.repo3.String(), Equals,
595 "linux/natty [] publishes {contrib: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}, {main: [snap]: Snapshot from mirror [yandex]: http://mirror.yandex.ru/debian/ squeeze}")
596 c.Check(s.repo5.String(), Equals,
597 "files:other:ppa/maverick [source] publishes {main: [local1]: comment1}")
598}
599
600func (s *PublishedRepoSuite) TestKey(c *C) {
601 c.Check(s.repo.Key(), DeepEquals, []byte("Uppa>>squeeze"))

Callers

nothing calls this directly

Calls 4

StringMethod · 0.95
NewPublishedRepoFunction · 0.85
StringMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected