How to use Create method of kvm Package

Best Syzkaller code snippet using kvm.Create

kvm_test.go

Source:kvm_test.go Github

copy

Full Screen

...22 return &ufspb.KVM{23 Name: id,24 }25}26func TestCreateKVM(t *testing.T) {27 t.Parallel()28 ctx := testingContext()29 rack1 := &ufspb.Rack{30 Name: "rack-1",31 Rack: &ufspb.Rack_ChromeBrowserRack{32 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},33 },34 }35 registration.CreateRack(ctx, rack1)36 Convey("CreateKVM", t, func() {37 Convey("Create new kvm with already existing kvm - error", func() {38 rack1 := &ufspb.Rack{39 Name: "rack-5",40 Rack: &ufspb.Rack_ChromeBrowserRack{41 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},42 },43 }44 registration.CreateRack(ctx, rack1)45 kvm1 := &ufspb.KVM{46 Name: "kvm-1",47 Rack: "rack-5",48 }49 _, err := registration.CreateKVM(ctx, kvm1)50 resp, err := CreateKVM(ctx, kvm1)51 So(resp, ShouldBeNil)52 So(err, ShouldNotBeNil)53 So(err.Error(), ShouldContainSubstring, "KVM kvm-1 already exists in the system")54 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-1")55 So(err, ShouldBeNil)56 So(changes, ShouldHaveLength, 0)57 })58 Convey("Create new kvm with non existing chromePlatform", func() {59 kvm2 := &ufspb.KVM{60 Name: "kvm-2",61 ChromePlatform: "chromePlatform-1",62 Rack: "rack-1",63 }64 resp, err := CreateKVM(ctx, kvm2)65 So(resp, ShouldBeNil)66 So(err, ShouldNotBeNil)67 So(err.Error(), ShouldContainSubstring, "There is no ChromePlatform with ChromePlatformID chromePlatform-1 in the system")68 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-2")69 So(err, ShouldBeNil)70 So(changes, ShouldHaveLength, 0)71 })72 Convey("Create new kvm with existing resources", func() {73 chromePlatform2 := &ufspb.ChromePlatform{74 Name: "chromePlatform-2",75 }76 _, err := configuration.CreateChromePlatform(ctx, chromePlatform2)77 So(err, ShouldBeNil)78 kvm2 := &ufspb.KVM{79 Name: "kvm-2",80 ChromePlatform: "chromePlatform-2",81 Rack: "rack-1",82 }83 resp, err := CreateKVM(ctx, kvm2)84 So(err, ShouldBeNil)85 So(resp, ShouldResembleProto, kvm2)86 s, err := state.GetStateRecord(ctx, "kvms/kvm-2")87 So(err, ShouldBeNil)88 So(s.GetState(), ShouldEqual, ufspb.State_STATE_REGISTERED)89 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-2")90 So(err, ShouldBeNil)91 So(changes, ShouldHaveLength, 1)92 So(changes[0].GetOldValue(), ShouldEqual, LifeCycleRegistration)93 So(changes[0].GetNewValue(), ShouldEqual, LifeCycleRegistration)94 So(changes[0].GetEventLabel(), ShouldEqual, "kvm")95 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-2")96 So(err, ShouldBeNil)97 So(msgs, ShouldHaveLength, 1)98 So(msgs[0].Delete, ShouldBeFalse)99 })100 Convey("Create KVM - duplicated mac address", func() {101 kvm := &ufspb.KVM{102 Name: "kvm-2-mac",103 MacAddress: "kvm-2-address",104 }105 _, err := registration.CreateKVM(ctx, kvm)106 kvm2 := &ufspb.KVM{107 Name: "kvm-2-mac2",108 MacAddress: "kvm-2-address",109 Rack: "rack-1",110 }111 _, err = CreateKVM(ctx, kvm2)112 So(err, ShouldNotBeNil)113 So(err.Error(), ShouldContainSubstring, "mac_address kvm-2-address is already occupied")114 })115 Convey("Create new kvm with existing rack", func() {116 rack := &ufspb.Rack{117 Name: "rack-10",118 Rack: &ufspb.Rack_ChromeBrowserRack{119 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},120 },121 }122 _, err := registration.CreateRack(ctx, rack)123 So(err, ShouldBeNil)124 kvm1 := &ufspb.KVM{125 Name: "kvm-20",126 Rack: "rack-10",127 }128 resp, err := CreateKVM(ctx, kvm1)129 So(err, ShouldBeNil)130 So(resp, ShouldResembleProto, kvm1)131 s, err := state.GetStateRecord(ctx, "kvms/kvm-20")132 So(err, ShouldBeNil)133 So(s.GetState(), ShouldEqual, ufspb.State_STATE_REGISTERED)134 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-20")135 So(err, ShouldBeNil)136 So(changes, ShouldHaveLength, 1)137 So(changes[0].GetOldValue(), ShouldEqual, LifeCycleRegistration)138 So(changes[0].GetNewValue(), ShouldEqual, LifeCycleRegistration)139 So(changes[0].GetEventLabel(), ShouldEqual, "kvm")140 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-20")141 So(err, ShouldBeNil)142 So(msgs, ShouldHaveLength, 1)143 So(msgs[0].Delete, ShouldBeFalse)144 })145 Convey("Create new kvm - Permission denied: same realm and no create permission", func() {146 rack := &ufspb.Rack{147 Name: "rack-20",148 Rack: &ufspb.Rack_ChromeBrowserRack{149 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},150 },151 Realm: util.BrowserLabAdminRealm,152 }153 _, err := registration.CreateRack(ctx, rack)154 So(err, ShouldBeNil)155 kvm1 := &ufspb.KVM{156 Name: "kvm-20",157 Rack: "rack-20",158 }159 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsGet, util.BrowserLabAdminRealm)160 _, err = CreateKVM(ctx, kvm1)161 So(err, ShouldNotBeNil)162 So(err.Error(), ShouldContainSubstring, PermissionDenied)163 })164 Convey("Create new kvm - Permission denied: different realm", func() {165 rack := &ufspb.Rack{166 Name: "rack-21",167 Rack: &ufspb.Rack_ChromeBrowserRack{168 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},169 },170 Realm: util.BrowserLabAdminRealm,171 }172 _, err := registration.CreateRack(ctx, rack)173 So(err, ShouldBeNil)174 kvm1 := &ufspb.KVM{175 Name: "kvm-21",176 Rack: "rack-21",177 }178 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsCreate, util.AtlLabAdminRealm)179 _, err = CreateKVM(ctx, kvm1)180 So(err, ShouldNotBeNil)181 So(err.Error(), ShouldContainSubstring, PermissionDenied)182 })183 })184}185func TestUpdateKVM(t *testing.T) {186 t.Parallel()187 ctx := testingContext()188 Convey("UpdateKVM", t, func() {189 Convey("Update kvm with non-existing kvm", func() {190 rack1 := &ufspb.Rack{191 Name: "rack-1",192 }193 _, err := registration.CreateRack(ctx, rack1)194 So(err, ShouldBeNil)195 kvm1 := &ufspb.KVM{196 Name: "kvm-1",197 Rack: "rack-1",198 }199 resp, err := UpdateKVM(ctx, kvm1, nil)200 So(resp, ShouldBeNil)201 So(err, ShouldNotBeNil)202 So(err.Error(), ShouldContainSubstring, NotFound)203 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-1")204 So(err, ShouldBeNil)205 So(changes, ShouldHaveLength, 0)206 })207 Convey("Update kvm with new rack(same realm) - pass", func() {208 rack3 := &ufspb.Rack{209 Name: "rack-3",210 Rack: &ufspb.Rack_ChromeBrowserRack{211 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},212 },213 Realm: util.BrowserLabAdminRealm,214 }215 _, err := registration.CreateRack(ctx, rack3)216 So(err, ShouldBeNil)217 rack4 := &ufspb.Rack{218 Name: "rack-4",219 Rack: &ufspb.Rack_ChromeBrowserRack{220 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},221 },222 Realm: util.BrowserLabAdminRealm,223 }224 _, err = registration.CreateRack(ctx, rack4)225 So(err, ShouldBeNil)226 kvm3 := &ufspb.KVM{227 Name: "kvm-3",228 Rack: "rack-3",229 }230 _, err = registration.CreateKVM(ctx, kvm3)231 So(err, ShouldBeNil)232 kvm3.Rack = "rack-4"233 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)234 resp, err := UpdateKVM(ctx, kvm3, nil)235 So(err, ShouldBeNil)236 So(resp, ShouldNotBeNil)237 So(resp, ShouldResembleProto, kvm3)238 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-3")239 So(err, ShouldBeNil)240 So(changes, ShouldHaveLength, 1)241 So(changes[0].GetEventLabel(), ShouldEqual, "kvm.rack")242 So(changes[0].GetOldValue(), ShouldEqual, "rack-3")243 So(changes[0].GetNewValue(), ShouldEqual, "rack-4")244 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-3")245 So(err, ShouldBeNil)246 So(msgs, ShouldHaveLength, 1)247 So(msgs[0].Delete, ShouldBeFalse)248 })249 Convey("Update kvm with same rack(same realm) - pass", func() {250 rack := &ufspb.Rack{251 Name: "rack-5",252 Rack: &ufspb.Rack_ChromeBrowserRack{253 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},254 },255 Realm: util.BrowserLabAdminRealm,256 }257 _, err := registration.CreateRack(ctx, rack)258 So(err, ShouldBeNil)259 kvm1 := &ufspb.KVM{260 Name: "kvm-5",261 Rack: "rack-5",262 MacAddress: "kvm-10-address",263 }264 _, err = registration.CreateKVM(ctx, kvm1)265 So(err, ShouldBeNil)266 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)267 resp, err := UpdateKVM(ctx, kvm1, nil)268 So(err, ShouldBeNil)269 So(resp, ShouldNotBeNil)270 So(resp, ShouldResembleProto, kvm1)271 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-5")272 So(err, ShouldBeNil)273 // Nothing is changed for kvm-5274 So(changes, ShouldHaveLength, 0)275 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-5")276 So(err, ShouldBeNil)277 So(msgs, ShouldHaveLength, 1)278 So(msgs[0].Delete, ShouldBeFalse)279 })280 Convey("Update kvm with non existing rack", func() {281 rack1 := &ufspb.Rack{282 Name: "rack-6.1",283 }284 _, err := registration.CreateRack(ctx, rack1)285 So(err, ShouldBeNil)286 kvm1 := &ufspb.KVM{287 Name: "kvm-6",288 Rack: "rack-6.1",289 }290 _, err = registration.CreateKVM(ctx, kvm1)291 So(err, ShouldBeNil)292 kvm1.Rack = "rack-6"293 resp, err := UpdateKVM(ctx, kvm1, nil)294 So(resp, ShouldBeNil)295 So(err, ShouldNotBeNil)296 So(err.Error(), ShouldContainSubstring, "There is no Rack with RackID rack-6 in the system")297 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-6")298 So(err, ShouldBeNil)299 So(changes, ShouldHaveLength, 0)300 })301 Convey("Partial Update kvm", func() {302 rack1 := &ufspb.Rack{303 Name: "rack-7",304 Realm: util.BrowserLabAdminRealm,305 }306 _, err := registration.CreateRack(ctx, rack1)307 So(err, ShouldBeNil)308 kvm := &ufspb.KVM{309 Name: "kvm-7",310 Rack: "rack-7",311 ChromePlatform: "chromePlatform-7",312 Tags: []string{"testkvm"},313 }314 _, err = registration.CreateKVM(ctx, kvm)315 So(err, ShouldBeNil)316 chromePlatform := &ufspb.ChromePlatform{317 Name: "chromePlatform-8",318 }319 _, err = configuration.CreateChromePlatform(ctx, chromePlatform)320 So(err, ShouldBeNil)321 kvm1 := &ufspb.KVM{322 Name: "kvm-7",323 MacAddress: "efgh",324 ChromePlatform: "chromePlatform-8",325 }326 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)327 resp, err := UpdateKVM(ctx, kvm1, &field_mask.FieldMask{Paths: []string{"platform", "macAddress"}})328 So(err, ShouldBeNil)329 So(resp, ShouldNotBeNil)330 So(resp.GetChromePlatform(), ShouldResemble, "chromePlatform-8")331 So(resp.GetMacAddress(), ShouldResemble, "efgh")332 So(resp.GetTags(), ShouldResemble, []string{"testkvm"})333 })334 Convey("Partial Update kvm mac address - duplicated mac address", func() {335 rack1 := &ufspb.Rack{336 Name: "rack-8",337 }338 _, err := registration.CreateRack(ctx, rack1)339 So(err, ShouldBeNil)340 kvm := &ufspb.KVM{341 Name: "kvm-8",342 Rack: "rack-8",343 MacAddress: "kvm-8-address",344 }345 _, err = registration.CreateKVM(ctx, kvm)346 So(err, ShouldBeNil)347 kvm2 := &ufspb.KVM{348 Name: "kvm-8.2",349 Rack: "rack-8",350 MacAddress: "kvm-8.2-address",351 }352 _, err = registration.CreateKVM(ctx, kvm2)353 So(err, ShouldBeNil)354 kvm1 := &ufspb.KVM{355 Name: "kvm-8",356 MacAddress: "kvm-8.2-address",357 }358 _, err = UpdateKVM(ctx, kvm1, &field_mask.FieldMask{Paths: []string{"macAddress"}})359 So(err, ShouldNotBeNil)360 So(err.Error(), ShouldContainSubstring, "mac_address kvm-8.2-address is already occupied")361 })362 Convey("Update kvm mac address - duplicated mac address", func() {363 rack1 := &ufspb.Rack{364 Name: "rack-9",365 }366 _, err := registration.CreateRack(ctx, rack1)367 So(err, ShouldBeNil)368 kvm := &ufspb.KVM{369 Name: "kvm-9",370 Rack: "rack-9",371 MacAddress: "kvm-9-address",372 }373 _, err = registration.CreateKVM(ctx, kvm)374 So(err, ShouldBeNil)375 kvm2 := &ufspb.KVM{376 Name: "kvm-9.2",377 Rack: "rack-9",378 MacAddress: "kvm-9.2-address",379 }380 _, err = registration.CreateKVM(ctx, kvm2)381 So(err, ShouldBeNil)382 kvm1 := &ufspb.KVM{383 Name: "kvm-9",384 MacAddress: "kvm-9.2-address",385 }386 _, err = UpdateKVM(ctx, kvm1, nil)387 So(err, ShouldNotBeNil)388 So(err.Error(), ShouldContainSubstring, "mac_address kvm-9.2-address is already occupied")389 })390 Convey("Update kvm - Permission denied: same realm and no update permission", func() {391 rack := &ufspb.Rack{392 Name: "rack-51",393 Rack: &ufspb.Rack_ChromeBrowserRack{394 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},395 },396 Realm: util.BrowserLabAdminRealm,397 }398 _, err := registration.CreateRack(ctx, rack)399 So(err, ShouldBeNil)400 kvm1 := &ufspb.KVM{401 Name: "kvm-51",402 Rack: "rack-51",403 }404 _, err = registration.CreateKVM(ctx, kvm1)405 So(err, ShouldBeNil)406 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsGet, util.BrowserLabAdminRealm)407 _, err = UpdateKVM(ctx, kvm1, nil)408 So(err, ShouldNotBeNil)409 So(err.Error(), ShouldContainSubstring, PermissionDenied)410 })411 Convey("Update kvm - Permission denied: different realm", func() {412 rack := &ufspb.Rack{413 Name: "rack-52",414 Rack: &ufspb.Rack_ChromeBrowserRack{415 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},416 },417 Realm: util.BrowserLabAdminRealm,418 }419 _, err := registration.CreateRack(ctx, rack)420 So(err, ShouldBeNil)421 kvm1 := &ufspb.KVM{422 Name: "kvm-52",423 Rack: "rack-52",424 }425 _, err = registration.CreateKVM(ctx, kvm1)426 So(err, ShouldBeNil)427 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.AtlLabAdminRealm)428 _, err = UpdateKVM(ctx, kvm1, nil)429 So(err, ShouldNotBeNil)430 So(err.Error(), ShouldContainSubstring, PermissionDenied)431 })432 Convey("Update kvm with new rack(different realm with no permission)- fail", func() {433 rack3 := &ufspb.Rack{434 Name: "rack-53",435 Rack: &ufspb.Rack_ChromeBrowserRack{436 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},437 },438 Realm: util.BrowserLabAdminRealm,439 }440 _, err := registration.CreateRack(ctx, rack3)441 So(err, ShouldBeNil)442 rack4 := &ufspb.Rack{443 Name: "rack-54",444 Rack: &ufspb.Rack_ChromeBrowserRack{445 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},446 },447 Realm: util.AtlLabAdminRealm,448 }449 _, err = registration.CreateRack(ctx, rack4)450 So(err, ShouldBeNil)451 kvm3 := &ufspb.KVM{452 Name: "kvm-53",453 Rack: "rack-53",454 }455 _, err = registration.CreateKVM(ctx, kvm3)456 So(err, ShouldBeNil)457 kvm3.Rack = "rack-54"458 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)459 _, err = UpdateKVM(ctx, kvm3, nil)460 So(err, ShouldNotBeNil)461 So(err.Error(), ShouldContainSubstring, PermissionDenied)462 })463 Convey("Update kvm with new rack(different realm with permission)- pass", func() {464 rack3 := &ufspb.Rack{465 Name: "rack-55",466 Rack: &ufspb.Rack_ChromeBrowserRack{467 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},468 },469 Realm: util.BrowserLabAdminRealm,470 }471 _, err := registration.CreateRack(ctx, rack3)472 So(err, ShouldBeNil)473 rack4 := &ufspb.Rack{474 Name: "rack-56",475 Rack: &ufspb.Rack_ChromeBrowserRack{476 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},477 },478 Realm: util.AtlLabAdminRealm,479 }480 _, err = registration.CreateRack(ctx, rack4)481 So(err, ShouldBeNil)482 kvm3 := &ufspb.KVM{483 Name: "kvm-55",484 Rack: "rack-55",485 }486 _, err = registration.CreateKVM(ctx, kvm3)487 So(err, ShouldBeNil)488 kvm3.Rack = "rack-56"489 ctx := auth.WithState(ctx, &authtest.FakeState{490 Identity: "user:user@example.com",491 FakeDB: authtest.NewFakeDB(492 authtest.MockMembership("user:user@example.com", "user"),493 authtest.MockPermission("user:user@example.com", util.AtlLabAdminRealm, util.RegistrationsUpdate),494 authtest.MockPermission("user:user@example.com", util.BrowserLabAdminRealm, util.RegistrationsUpdate),495 ),496 })497 resp, err := UpdateKVM(ctx, kvm3, nil)498 So(err, ShouldBeNil)499 So(resp, ShouldNotBeNil)500 So(resp, ShouldResembleProto, kvm3)501 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-55")502 So(err, ShouldBeNil)503 So(changes, ShouldHaveLength, 1)504 So(changes[0].GetEventLabel(), ShouldEqual, "kvm.rack")505 So(changes[0].GetOldValue(), ShouldEqual, "rack-55")506 So(changes[0].GetNewValue(), ShouldEqual, "rack-56")507 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-55")508 So(err, ShouldBeNil)509 So(msgs, ShouldHaveLength, 1)510 So(msgs[0].Delete, ShouldBeFalse)511 })512 Convey("Partial Update kvm with new rack(same realm) - pass", func() {513 rack := &ufspb.Rack{514 Name: "rack-57",515 Rack: &ufspb.Rack_ChromeBrowserRack{516 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},517 },518 Realm: util.BrowserLabAdminRealm,519 }520 _, err := registration.CreateRack(ctx, rack)521 So(err, ShouldBeNil)522 s := &ufspb.KVM{523 Name: "kvm-57",524 Rack: "rack-57",525 }526 _, err = registration.CreateKVM(ctx, s)527 So(err, ShouldBeNil)528 rack = &ufspb.Rack{529 Name: "rack-58",530 Rack: &ufspb.Rack_ChromeBrowserRack{531 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},532 },533 Realm: util.BrowserLabAdminRealm,534 }535 _, err = registration.CreateRack(ctx, rack)536 So(err, ShouldBeNil)537 s.Rack = "rack-58"538 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)539 resp, err := UpdateKVM(ctx, s, &field_mask.FieldMask{Paths: []string{"rack"}})540 So(err, ShouldBeNil)541 So(resp, ShouldNotBeNil)542 So(resp.GetRack(), ShouldResemble, "rack-58")543 })544 Convey("Partial Update kvm with new rack(different realm with permission) - pass", func() {545 rack := &ufspb.Rack{546 Name: "rack-59",547 Rack: &ufspb.Rack_ChromeBrowserRack{548 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},549 },550 Realm: util.BrowserLabAdminRealm,551 }552 _, err := registration.CreateRack(ctx, rack)553 So(err, ShouldBeNil)554 s := &ufspb.KVM{555 Name: "kvm-59",556 Rack: "rack-59",557 }558 _, err = registration.CreateKVM(ctx, s)559 So(err, ShouldBeNil)560 rack = &ufspb.Rack{561 Name: "rack-60",562 Rack: &ufspb.Rack_ChromeBrowserRack{563 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},564 },565 Realm: util.AtlLabAdminRealm,566 }567 _, err = registration.CreateRack(ctx, rack)568 So(err, ShouldBeNil)569 s.Rack = "rack-60"570 ctx := auth.WithState(ctx, &authtest.FakeState{571 Identity: "user:user@example.com",572 FakeDB: authtest.NewFakeDB(573 authtest.MockMembership("user:user@example.com", "user"),574 authtest.MockPermission("user:user@example.com", util.AtlLabAdminRealm, util.RegistrationsUpdate),575 authtest.MockPermission("user:user@example.com", util.BrowserLabAdminRealm, util.RegistrationsUpdate),576 ),577 })578 resp, err := UpdateKVM(ctx, s, &field_mask.FieldMask{Paths: []string{"rack"}})579 So(err, ShouldBeNil)580 So(resp, ShouldNotBeNil)581 So(resp.GetRack(), ShouldResemble, "rack-60")582 })583 Convey("Partial Update kvm with new rack(different realm without permission) - fail", func() {584 rack := &ufspb.Rack{585 Name: "rack-61",586 Rack: &ufspb.Rack_ChromeBrowserRack{587 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},588 },589 Realm: util.BrowserLabAdminRealm,590 }591 _, err := registration.CreateRack(ctx, rack)592 So(err, ShouldBeNil)593 s := &ufspb.KVM{594 Name: "kvm-61",595 Rack: "rack-61",596 }597 _, err = registration.CreateKVM(ctx, s)598 So(err, ShouldBeNil)599 rack = &ufspb.Rack{600 Name: "rack-62",601 Rack: &ufspb.Rack_ChromeBrowserRack{602 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},603 },604 Realm: util.AtlLabAdminRealm,605 }606 _, err = registration.CreateRack(ctx, rack)607 So(err, ShouldBeNil)608 s.Rack = "rack-62"609 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsUpdate, util.BrowserLabAdminRealm)610 _, err = UpdateKVM(ctx, s, &field_mask.FieldMask{Paths: []string{"rack"}})611 So(err, ShouldNotBeNil)612 So(err.Error(), ShouldContainSubstring, PermissionDenied)613 })614 })615}616func TestDeleteKVM(t *testing.T) {617 t.Parallel()618 ctx := testingContext()619 Convey("DeleteKVM", t, func() {620 Convey("Delete kvm by non-existing ID - error", func() {621 err := DeleteKVM(ctx, "kvm-10")622 So(err, ShouldNotBeNil)623 So(err.Error(), ShouldContainSubstring, NotFound)624 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-10")625 So(err, ShouldBeNil)626 So(changes, ShouldHaveLength, 0)627 })628 Convey("Delete KVM by existing ID with machine reference", func() {629 rack1 := &ufspb.Rack{630 Name: "rack-1",631 Rack: &ufspb.Rack_ChromeBrowserRack{632 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},633 },634 }635 registration.CreateRack(ctx, rack1)636 KVM1 := &ufspb.KVM{637 Name: "KVM-1",638 Rack: "rack-1",639 }640 _, err := registration.CreateKVM(ctx, KVM1)641 So(err, ShouldBeNil)642 chromeBrowserMachine1 := &ufspb.Machine{643 Name: "machine-1",644 Device: &ufspb.Machine_ChromeBrowserMachine{645 ChromeBrowserMachine: &ufspb.ChromeBrowserMachine{646 KvmInterface: &ufspb.KVMInterface{647 Kvm: "KVM-1",648 },649 },650 },651 }652 _, err = registration.CreateMachine(ctx, chromeBrowserMachine1)653 So(err, ShouldBeNil)654 err = DeleteKVM(ctx, "KVM-1")655 So(err, ShouldNotBeNil)656 So(err.Error(), ShouldContainSubstring, "Machines referring the KVM:")657 resp, err := registration.GetKVM(ctx, "KVM-1")658 So(resp, ShouldNotBeNil)659 So(err, ShouldBeNil)660 So(resp, ShouldResembleProto, KVM1)661 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/KVM-1")662 So(err, ShouldBeNil)663 So(changes, ShouldHaveLength, 0)664 })665 Convey("Delete KVM successfully", func() {666 rack1 := &ufspb.Rack{667 Name: "rack-2",668 Rack: &ufspb.Rack_ChromeBrowserRack{669 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},670 },671 }672 registration.CreateRack(ctx, rack1)673 kvm2 := mockKVM("kvm-2")674 kvm2.Rack = "rack-2"675 _, err := registration.CreateKVM(ctx, kvm2)676 So(err, ShouldBeNil)677 _, err = state.BatchUpdateStates(ctx, []*ufspb.StateRecord{678 {679 ResourceName: "kvms/kvm-2",680 State: ufspb.State_STATE_SERVING,681 },682 })683 So(err, ShouldBeNil)684 err = DeleteKVM(ctx, "kvm-2")685 So(err, ShouldBeNil)686 resp, err := registration.GetKVM(ctx, "kvm-2")687 So(resp, ShouldBeNil)688 So(err, ShouldNotBeNil)689 So(err.Error(), ShouldContainSubstring, NotFound)690 _, err = state.GetStateRecord(ctx, "kvms/kvm-2")691 So(err.Error(), ShouldContainSubstring, NotFound)692 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-2")693 So(err, ShouldBeNil)694 So(changes, ShouldHaveLength, 1)695 So(changes[0].GetOldValue(), ShouldEqual, LifeCycleRetire)696 So(changes[0].GetNewValue(), ShouldEqual, LifeCycleRetire)697 So(changes[0].GetEventLabel(), ShouldEqual, "kvm")698 })699 Convey("Delete KVM successfully together with deleting ip", func() {700 rack1 := &ufspb.Rack{701 Name: "rack-ip2",702 Rack: &ufspb.Rack_ChromeBrowserRack{703 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},704 },705 }706 registration.CreateRack(ctx, rack1)707 kvm2 := mockKVM("kvm-ip2")708 kvm2.Rack = "rack-ip2"709 _, err := registration.CreateKVM(ctx, kvm2)710 So(err, ShouldBeNil)711 _, err = state.BatchUpdateStates(ctx, []*ufspb.StateRecord{712 {713 ResourceName: "kvms/kvm-ip2",714 State: ufspb.State_STATE_SERVING,715 },716 })717 So(err, ShouldBeNil)718 _, err = configuration.BatchUpdateDHCPs(ctx, []*ufspb.DHCPConfig{719 {720 Hostname: "kvm-ip2",721 Ip: "1.2.3.4",722 },723 })724 So(err, ShouldBeNil)725 _, err = configuration.ImportIPs(ctx, []*ufspb.IP{726 {727 Id: "vlan-1:123",728 Ipv4Str: "1.2.3.4",729 Vlan: "vlan-1",730 Occupied: true,731 Ipv4: 123,732 },733 })734 So(err, ShouldBeNil)735 err = DeleteKVM(ctx, "kvm-ip2")736 So(err, ShouldBeNil)737 ip, err := configuration.QueryIPByPropertyName(ctx, map[string]string{"ipv4_str": "1.2.3.4"})738 So(err, ShouldBeNil)739 So(ip, ShouldHaveLength, 1)740 So(ip[0].GetOccupied(), ShouldBeFalse)741 _, err = configuration.GetDHCPConfig(ctx, "kvm-ip2")742 So(err, ShouldNotBeNil)743 So(err.Error(), ShouldContainSubstring, NotFound)744 resp, err := registration.GetKVM(ctx, "kvm-2")745 So(resp, ShouldBeNil)746 So(err, ShouldNotBeNil)747 So(err.Error(), ShouldContainSubstring, NotFound)748 _, err = state.GetStateRecord(ctx, "kvms/kvm-2")749 So(err.Error(), ShouldContainSubstring, NotFound)750 changes, err := history.QueryChangesByPropertyName(ctx, "name", "kvms/kvm-ip2")751 So(err, ShouldBeNil)752 So(changes, ShouldHaveLength, 1)753 So(changes[0].GetOldValue(), ShouldEqual, LifeCycleRetire)754 So(changes[0].GetNewValue(), ShouldEqual, LifeCycleRetire)755 So(changes[0].GetEventLabel(), ShouldEqual, "kvm")756 msgs, err := history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "kvms/kvm-ip2")757 So(err, ShouldBeNil)758 So(msgs, ShouldHaveLength, 1)759 So(msgs[0].Delete, ShouldBeTrue)760 msgs, err = history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "dhcps/kvm-ip2")761 So(err, ShouldBeNil)762 So(msgs, ShouldHaveLength, 1)763 So(msgs[0].Delete, ShouldBeTrue)764 msgs, err = history.QuerySnapshotMsgByPropertyName(ctx, "resource_name", "states/kvms/kvm-ip2")765 So(err, ShouldBeNil)766 So(msgs, ShouldHaveLength, 1)767 So(msgs[0].Delete, ShouldBeTrue)768 })769 Convey("Delete kvm - Permission denied: same realm and no delete permission", func() {770 rack := &ufspb.Rack{771 Name: "rack-53",772 Rack: &ufspb.Rack_ChromeBrowserRack{773 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},774 },775 Realm: util.BrowserLabAdminRealm,776 }777 _, err := registration.CreateRack(ctx, rack)778 So(err, ShouldBeNil)779 kvm2 := mockKVM("kvm-53")780 kvm2.Rack = "rack-53"781 _, err = registration.CreateKVM(ctx, kvm2)782 So(err, ShouldBeNil)783 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsGet, util.BrowserLabAdminRealm)784 err = DeleteKVM(ctx, "kvm-53")785 So(err, ShouldNotBeNil)786 So(err.Error(), ShouldContainSubstring, PermissionDenied)787 })788 Convey("Delete kvm - Permission denied: different realm", func() {789 rack := &ufspb.Rack{790 Name: "rack-54",791 Rack: &ufspb.Rack_ChromeBrowserRack{792 ChromeBrowserRack: &ufspb.ChromeBrowserRack{},793 },794 Realm: util.BrowserLabAdminRealm,795 }796 _, err := registration.CreateRack(ctx, rack)797 So(err, ShouldBeNil)798 kvm2 := mockKVM("kvm-54")799 kvm2.Rack = "rack-54"800 _, err = registration.CreateKVM(ctx, kvm2)801 So(err, ShouldBeNil)802 ctx := initializeFakeAuthDB(ctx, "user:user@example.com", util.RegistrationsDelete, util.AtlLabAdminRealm)803 err = DeleteKVM(ctx, "kvm-54")804 So(err, ShouldNotBeNil)805 So(err.Error(), ShouldContainSubstring, PermissionDenied)806 })807 })808}809func TestListKVMs(t *testing.T) {810 t.Parallel()811 ctx := testingContext()812 kvmsWithChromeplatform := make([]*ufspb.KVM, 0, 2)813 kvms := make([]*ufspb.KVM, 0, 4)814 for i := 0; i < 4; i++ {815 kvm := mockKVM(fmt.Sprintf("kvm-%d", i))816 if i%2 == 0 {817 kvm.ChromePlatform = "chromeplatform-12"818 }819 resp, _ := registration.CreateKVM(ctx, kvm)820 if i%2 == 0 {821 kvmsWithChromeplatform = append(kvmsWithChromeplatform, resp)822 }823 kvms = append(kvms, resp)824 }825 Convey("ListKVMs", t, func() {826 Convey("List KVMs - filter invalid - error", func() {827 _, _, err := ListKVMs(ctx, 5, "", "invalid=mx-1", false)828 So(err, ShouldNotBeNil)829 So(err.Error(), ShouldContainSubstring, "Invalid field name invalid")830 })831 Convey("List KVMs - filter chromeplatform - happy path", func() {832 resp, _, _ := ListKVMs(ctx, 5, "", "platform=chromeplatform-12", false)833 So(resp, ShouldNotBeNil)834 So(resp, ShouldResembleProto, kvmsWithChromeplatform)835 })836 Convey("ListKVMs - Full listing - happy path", func() {837 resp, _, _ := ListKVMs(ctx, 5, "", "", false)838 So(resp, ShouldNotBeNil)839 So(resp, ShouldResembleProto, kvms)840 })841 })842}843func TestBatchGetKVMs(t *testing.T) {844 t.Parallel()845 ctx := testingContext()846 Convey("BatchGetKVMs", t, func() {847 Convey("Batch get kvms - happy path", func() {848 kvms := make([]*ufspb.KVM, 0, 4)849 for i := 0; i < 4; i++ {850 kvm := mockKVM(fmt.Sprintf("kvm-batchGet-%d", i))851 resp, err := registration.CreateKVM(ctx, kvm)852 So(err, ShouldBeNil)853 kvms = append(kvms, resp)854 }855 resp, err := registration.BatchGetKVM(ctx, []string{"kvm-batchGet-0", "kvm-batchGet-1", "kvm-batchGet-2", "kvm-batchGet-3"})856 So(err, ShouldBeNil)857 So(resp, ShouldHaveLength, 4)858 So(resp, ShouldResembleProto, kvms)859 })860 Convey("Batch get kvms - missing id", func() {861 resp, err := registration.BatchGetKVM(ctx, []string{"kvm-batchGet-non-existing"})862 So(err, ShouldNotBeNil)863 So(resp, ShouldBeNil)864 So(err.Error(), ShouldContainSubstring, "kvm-batchGet-non-existing")865 })...

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 file, err := os.Create("test.txt")4 if err != nil {5 fmt.Println(err)6 }7 defer file.Close()8 fmt.Println("File Created Successfully. Writing data to file")9 writer := bufio.NewWriter(file)10 writer.WriteString("This is sample data")11 writer.Flush()12}13import (14func main() {15 file, err := os.Open("test.txt")16 if err != nil {17 fmt.Println(err)18 }19 defer file.Close()20 fmt.Println("File Opened Successfully")21}22import (23func main() {24 file, err := os.OpenFile("test.txt", os.O_RDWR, 0644)25 if err != nil {26 fmt.Println(err)27 }28 defer file.Close()29 fmt.Println("File Opened Successfully")30}31import (

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1func main() {2 kvm.Create()3}4func main() {5 kvm.Create()6}7func main() {8 kvm.Create()9}10func main() {11 kvm.Create()12}13func main() {14 kvm.Create()15}16func main() {17 kvm.Create()18}19func main() {20 kvm.Create()21}22func main() {23 kvm.Create()24}25func main() {26 kvm.Create()27}28func main() {29 kvm.Create()30}31func main() {32 kvm.Create()33}34func main() {35 kvm.Create()36}37func main() {38 kvm.Create()39}40func main() {41 kvm.Create()42}43func main() {44 kvm.Create()45}46func main() {47 kvm.Create()48}

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 c := &serial.Config{Name: "COM3", Baud: 115200}4 s, err := serial.OpenPort(c)5 if err != nil {6 fmt.Println(err)7 }8 n, err := s.Write([]byte("AT+CGATT?\r\n"))9 if err != nil {10 fmt.Println(err)11 }12 fmt.Println(n)13 time.Sleep(1 * time.Second)14 buf := make([]byte, 128)15 n, err = s.Read(buf)16 if err != nil {17 fmt.Println(err)18 }19 fmt.Println(string(buf[:n]))20 time.Sleep(1 * time.Second)21 n, err = s.Write([]byte("AT+CGATT?\r\n"))22 if err != nil {23 fmt.Println(err)24 }25 fmt.Println(n)26 time.Sleep(1 * time.Second)27 n, err = s.Read(buf)28 if err != nil {29 fmt.Println(err)30 }31 fmt.Println(string(buf[:n]))32 time.Sleep(1 * time.Second)33 n, err = s.Write([]byte("AT+CGATT?\r\n"))34 if err != nil {35 fmt.Println(err)36 }37 fmt.Println(n)38 time.Sleep(1 * time.Second)39 n, err = s.Read(buf)40 if err != nil {41 fmt.Println(err)42 }43 fmt.Println(string(buf[:n]))44 time.Sleep(1 * time.Second)45 n, err = s.Write([]byte("AT+CGATT?\r\n"))46 if err != nil {47 fmt.Println(err)48 }49 fmt.Println(n)50 time.Sleep(1 * time.Second)51 n, err = s.Read(buf)52 if err != nil {53 fmt.Println(err)54 }55 fmt.Println(string(buf[:n]))56 time.Sleep(1 * time.Second)57 n, err = s.Write([]byte("AT+CGATT?\r\n"))58 if err != nil {59 fmt.Println(err)60 }61 fmt.Println(n)62 time.Sleep(1 * time.Second)

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 }5 defer conn.Close()6 vm, err := conn.DomainCreateXML("<domain type='kvm'><name>test</name><memory unit='MiB'>1024</memory><currentMemory unit='MiB'>1024</currentMemory><vcpu placement='static'>1</vcpu><os><type arch='x86_64' machine='pc'>hvm</type><boot dev='hd'/></os><features><acpi/><apic/><pae/></features><cpu mode='host-passthrough'><topology sockets='1' cores='1' threads='1'/></cpu><clock offset='utc'/><on_poweroff>destroy</on_poweroff><on_reboot>restart</on_reboot><on_crash>destroy</on_crash><devices><emulator>/usr/bin/kvm-spice</emulator><disk type='file' device='disk'><driver name='qemu' type='qcow2'/><source file='/var/lib/libvirt/images/test.qcow2'/><target dev='vda' bus='virtio'/></disk><controller type='usb' index='0'><address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/></controller><interface type='network'><source network='default'/><model type='virtio'/></interface><serial type='pty'><target port='0'/></serial><console type='pty' tty='/dev/pts/3'><target type='serial' port='0'/></console><input type='tablet' bus='usb'/><input type='mouse' bus='ps2'/><graphics type='spice' autoport='yes' listen='

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 f, err := os.Create("C:/Users/DELL/Desktop/GO/2.go")4 if err != nil {5 fmt.Println(err)6 }7 l, err := f.WriteString("package main")8 if err != nil {9 fmt.Println(err)10 f.Close()11 }12 fmt.Println(l, "bytes written successfully")13 err = f.Close()14 if err != nil {15 fmt.Println(err)16 }17}18import (19func main() {20 f, err := os.OpenFile("C:/Users/DELL/Desktop/GO/3.go", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)21 if err != nil {22 fmt.Println(err)23 }24 l, err := f.WriteString("package main")25 if err != nil {26 fmt.Println(err)27 f.Close()28 }29 fmt.Println(l, "bytes written successfully")30 err = f.Close()31 if err != nil {32 fmt.Println(err)33 }34}35import (36func main() {37 f, err := os.Open("C:/Users/DELL/Desktop/GO/4.go")38 if err != nil {39 fmt.Println(err)40 }41 fmt.Println("File opened successfully")42 err = f.Close()43 if err != nil {44 fmt.Println(err)45 }46}47import (48func main() {49 f, err := os.Stat("C:/Users/DELL/Desktop/GO/5.go")50 if err != nil {51 fmt.Println(err)52 }53 fmt.Println("File name:", f.Name())54 fmt.Println("Size in bytes:", f.Size())55 fmt.Println("Permissions:", f.Mode())56 fmt.Println("Last modified:", f.ModTime())57 fmt.Println("Is Directory: ", f.IsDir())58 fmt.Println("System interface type: ", f.Sys())59 fmt.Println("System info: ", f.Sys().(*syscall.Win32FileAttributeData))60}

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 kvm, err := kvm.NewKVM()4 if err != nil {5 fmt.Printf("Error creating new kvm instance: %s6 }7 defer kvm.Close()8 vm, err := kvm.Create(1, 512)9 if err != nil {10 fmt.Printf("Error creating new virtual machine: %s11 }12 defer vm.Close()13 err = vm.LoadKernel("/boot/vmlinuz-3.2.0-23-generic")14 if err != nil {15 fmt.Printf("Error loading kernel: %s16 }17 err = vm.LoadInitrd("/boot/initrd.img-3.2.0-23-generic")18 if err != nil {19 fmt.Printf("Error loading initrd: %s20 }21 vif, err := kvm.CreateVIF(2, 0x52, 0x54, 0x00, 0x12, 0x34, 0x56)22 if err != nil {23 fmt.Printf("Error creating new virtual network interface: %s24 }25 defer vif.Close()26 err = vm.AddVIF(vif)27 if err != nil {28 fmt.Printf("Error adding virtual network interface to virtual machine: %s29 }30 err = vm.AddDisk("/path/to/virtual/disk.img", true, false)31 if err != nil {32 fmt.Printf("Error adding virtual disk to virtual machine: %s33 }34 err = vm.Start()35 if err != nil {36 fmt.Printf("Error starting virtual machine: %s37 }38}39import (40func main() {

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 kvm := cmd.NewKVM()4 vm := kvm.Create("test")5 fmt.Println(vm.Name)6}7import (8func main() {9 kvm := cmd.NewKVM()10 kvm.Delete("test")11 fmt.Println("deleted")12}13import (14func main() {15 kvm := cmd.NewKVM()16 kvm.Start("test")17 fmt.Println("started")18}19import (20func main() {21 kvm := cmd.NewKVM()22 kvm.Stop("test")23 fmt.Println("stopped")24}25import (26func main() {27 kvm := cmd.NewKVM()28 kvm.Restart("test")29 fmt.Println("restarted")30}

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 k := new(vm.Kvm)4 err := k.Create("test", 512, 1, 1)5 if err != nil {6 fmt.Println(err)7 }8}9import (10func main() {11 k := new(vm.Kvm)12 err := k.Create("test", 512, 1, 1)13 if err != nil {14 fmt.Println(err)15 }16}17import (18func main() {19 k := new(vm.Kvm)20 err := k.Create("test", 512, 1, 1)21 if err != nil {22 fmt.Println(err)23 }24}25import (26func main() {27 k := new(vm.Kvm)28 err := k.Create("test", 512, 1, 1)29 if err != nil {30 fmt.Println(err)31 }32}33import (34func main() {35 k := new(vm.Kvm)36 err := k.Create("test", 512, 1, 1)37 if err != nil {38 fmt.Println(err)39 }40}41import (42func main() {43 k := new(vm.Kvm)44 err := k.Create("test", 512, 1, 1)45 if err != nil {46 fmt.Println(err)47 }48}

Full Screen

Full Screen

Create

Using AI Code Generation

copy

Full Screen

1import "fmt"2import "github.com/multiverse-os/kvm"3func main() {4 kvm.Create()5}6import "fmt"7import "github.com/multiverse-os/kvm"8func main() {9 machine := kvm.Create()10 machine.AddMemory(1024)11}12import "fmt"13import "github.com/multiverse-os/kvm"14func main() {15 machine := kvm.Create()16 machine.AddMemory(1024)17 machine.AddDisk("/home/kvm/ubuntu-14.04.qcow2")18}19import "fmt"20import "github.com/multiverse-os/kvm"21func main() {22 machine := kvm.Create()23 machine.AddMemory(1024)24 machine.AddDisk("/home/kvm/ubuntu-14.04.qcow2")25 machine.AddNetwork("virtio")26}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Syzkaller automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful