From 2d205e65230b7100e99d941f2292fb4a7cf90858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Sun, 27 Oct 2024 01:14:22 +0200 Subject: [PATCH] Remove parser serializer test for opcua. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ɓukasz Dywicki --- .../opcua/ParserSerializerTestsuite.xml | 32 ++++++++--------- .../opcua/readwrite/model/ExtensionObject.go | 7 ++-- .../model/ExtensionObjectWithMask.go | 7 ++-- .../tests/opcua_parser_serializer_test.go | 36 ------------------- 4 files changed, 26 insertions(+), 56 deletions(-) delete mode 100644 plc4go/tests/drivers/tests/opcua_parser_serializer_test.go diff --git a/plc4go/assets/testing/protocols/opcua/ParserSerializerTestsuite.xml b/plc4go/assets/testing/protocols/opcua/ParserSerializerTestsuite.xml index 488655b5b0b..049cefe7782 100644 --- a/plc4go/assets/testing/protocols/opcua/ParserSerializerTestsuite.xml +++ b/plc4go/assets/testing/protocols/opcua/ParserSerializerTestsuite.xml @@ -1,21 +1,21 @@ diff --git a/plc4go/protocols/opcua/readwrite/model/ExtensionObject.go b/plc4go/protocols/opcua/readwrite/model/ExtensionObject.go index 71d68d09c26..0a584dbe96a 100644 --- a/plc4go/protocols/opcua/readwrite/model/ExtensionObject.go +++ b/plc4go/protocols/opcua/readwrite/model/ExtensionObject.go @@ -73,8 +73,11 @@ type ExtensionObjectRequirements interface { // _ExtensionObject is the data-structure of this message type _ExtensionObject struct { - _SubType ExtensionObject - TypeId ExpandedNodeId + _SubType interface { + ExtensionObjectContract + ExtensionObjectRequirements + } + TypeId ExpandedNodeId } var _ ExtensionObjectContract = (*_ExtensionObject)(nil) diff --git a/plc4go/protocols/opcua/readwrite/model/ExtensionObjectWithMask.go b/plc4go/protocols/opcua/readwrite/model/ExtensionObjectWithMask.go index 1a378e0187e..08480a91c1b 100644 --- a/plc4go/protocols/opcua/readwrite/model/ExtensionObjectWithMask.go +++ b/plc4go/protocols/opcua/readwrite/model/ExtensionObjectWithMask.go @@ -72,7 +72,10 @@ type ExtensionObjectWithMaskRequirements interface { // _ExtensionObjectWithMask is the data-structure of this message type _ExtensionObjectWithMask struct { ExtensionObjectContract - _SubType ExtensionObjectWithMask + _SubType interface { + ExtensionObjectWithMaskContract + ExtensionObjectWithMaskRequirements + } EncodingMask ExtensionObjectEncodingMask // Arguments. @@ -432,6 +435,6 @@ func (m *_ExtensionObjectWithMask) deepCopy() *_ExtensionObjectWithMask { m.EncodingMask.DeepCopy().(ExtensionObjectEncodingMask), m.ExtensionId, } - //m.ExtensionObjectContract.(*_ExtensionObject)._SubType = m + m.ExtensionObjectContract.(*_ExtensionObject)._SubType = m return _ExtensionObjectWithMaskCopy } diff --git a/plc4go/tests/drivers/tests/opcua_parser_serializer_test.go b/plc4go/tests/drivers/tests/opcua_parser_serializer_test.go deleted file mode 100644 index 597e5e47ffd..00000000000 --- a/plc4go/tests/drivers/tests/opcua_parser_serializer_test.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package tests - -import ( - "testing" - - opcuaIO "github.com/apache/plc4x/plc4go/protocols/opcua/readwrite" - "github.com/apache/plc4x/plc4go/spi/options" - "github.com/apache/plc4x/plc4go/spi/testutils" -) - -func TestOPCUASerializer(t *testing.T) { - testutils.RunParserSerializerTestsuite(t, - "assets/testing/protocols/opcua/ParserSerializerTestsuite.xml", - opcuaIO.OpcuaParserHelper{}, - options.WithCustomLogger(testutils.ProduceTestingLogger(t)), - ) -}