VGC UT coverage upto 40%
Change-Id: Ifb2886a44ff49128ecddb2100f524b5274d0a063
diff --git a/internal/pkg/controller/pendingprofiles_test.go b/internal/pkg/controller/pendingprofiles_test.go
index fe0639c..dfb17f6 100644
--- a/internal/pkg/controller/pendingprofiles_test.go
+++ b/internal/pkg/controller/pendingprofiles_test.go
@@ -21,6 +21,7 @@
"voltha-go-controller/internal/test/mocks"
"github.com/golang/mock/gomock"
+ "github.com/stretchr/testify/assert"
)
func TestPendingProfilesTask_Start(t *testing.T) {
@@ -60,3 +61,103 @@
})
}
}
+
+func TestNewPendingProfilesTask(t *testing.T) {
+ type args struct {
+ device *Device
+ }
+ tests := []struct {
+ name string
+ args args
+ want *PendingProfilesTask
+ }{
+ {
+ name: "NewPendingProfilesTask",
+ args: args{
+ device: &Device{
+ ctx: context.Background(),
+ },
+ },
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got := NewPendingProfilesTask(tt.args.device)
+ assert.NotNil(t, got)
+ })
+ }
+}
+
+func TestPendingProfilesTask_Name(t *testing.T) {
+ tests := []struct {
+ name string
+ want string
+ }{
+ {
+ name: "PendingProfilesTask_Name",
+ want: "Pending Profiles Task",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ppt := &PendingProfilesTask{}
+ if got := ppt.Name(); got != tt.want {
+ t.Errorf("PendingProfilesTask.Name() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
+
+func TestPendingProfilesTask_TaskID(t *testing.T) {
+ tests := []struct {
+ name string
+ want uint8
+ }{
+ {
+ name: "PendingProfilesTask_TaskID",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ppt := &PendingProfilesTask{}
+ if got := ppt.TaskID(); got != tt.want {
+ t.Errorf("PendingProfilesTask.TaskID() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
+
+func TestPendingProfilesTask_Timestamp(t *testing.T) {
+ tests := []struct {
+ name string
+ want string
+ }{
+ {
+ name: "PendingProfilesTask_Timestamp",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ppt := &PendingProfilesTask{}
+ if got := ppt.Timestamp(); got != tt.want {
+ t.Errorf("PendingProfilesTask.Timestamp() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
+
+func TestPendingProfilesTask_Stop(t *testing.T) {
+ tests := []struct {
+ name string
+ }{
+ {
+ name: "PendingProfilesTask_Stop",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ppt := &PendingProfilesTask{}
+ ppt.Stop()
+ })
+ }
+}